| name | habeas-corpus-petition |
| title | Habeas Corpus Petition |
| description | Drafts federal and state habeas corpus petitions challenging unlawful detention on constitutional grounds under 28 U.S.C. §§ 2241, 2254, 2255 with AEDPA compliance, exhaustion tracking, and grounds-for-relief framing. Use when drafting habeas petitions, post-conviction relief filings, or challenging custody on constitutional grounds. Trigger keywords: habeas corpus, writ of habeas corpus, AEDPA, post-conviction relief, unlawful detention, exhaustion of remedies, ineffective assistance of counsel. |
| author | CaseMark |
| author_url | https://github.com/CaseMark/skills/tree/main/skills/legal/habeas-corpus-petition |
| license | Apache-2.0 |
| version | 0.1.0 |
| execution_mode | open |
| jurisdiction | us |
| practice | criminal |
| language | en |
| tags | ["drafting","litigation","pleading"] |
Habeas Corpus Petition
Produces a habeas corpus petition challenging lawfulness of detention, formatted for federal or state court filing with AEDPA-compliant arguments.
Prerequisites
- Conviction/detention records — judgment, sentence, charges, case numbers
- Procedural history — direct appeal and post-conviction outcomes at each level
- Trial record — transcripts, motions, evidence relevant to claimed violations
- Custody details — facility, prisoner ID, custodial official name and title
- Exhaustion documentation — proof claims were presented to highest available state court
- AEDPA timeliness — date conviction became final, any tolling events
Quick Start
- Identify petition type (§ 2254 / § 2241 / § 2255) from the custody and conviction posture.
- Verify AEDPA one-year deadline under § 2244(d); document tolling.
- Confirm exhaustion for each ground; flag unexhausted claims.
- Draft each ground with its own constitutional provision, SCOTUS authority, record citations, and § 2254(d) showing.
- Assemble petition sections per output structure below.
Output Structure
Caption
| Element | Federal | State |
|---|
| Court | U.S. District Court, [District] | [State court of competent jurisdiction] |
| Petitioner | Full legal name, prisoner ID, facility | Same |
| Respondent | Warden/superintendent with custody | Per state rules |
| Case No. | Existing or "To Be Assigned" | Per local rules |
| Statutory basis | 28 U.S.C. § 2254 / § 2241 / § 2255 | State habeas statute |
I. Introduction
Single paragraph: petitioner identity, custody location, conviction date, charges, sentence, constitutional challenge.
II. Parties
- Petitioner: full name, aliases, prisoner ID, facility address
- Respondent: official with immediate physical custody (name, title)
- Real parties in interest: prosecuting authority / attorney general if required
III. Jurisdiction and Venue