habeas-corpus-petition
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.
Best use case
habeas-corpus-petition is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
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.
Teams using habeas-corpus-petition should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/habeas-corpus-petition/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How habeas-corpus-petition Compares
| Feature / Agent | habeas-corpus-petition | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
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.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Habeas Corpus Petition Produces a habeas corpus petition challenging lawfulness of detention, formatted for federal or state court filing with AEDPA-compliant arguments. ## Prerequisites 1. **Conviction/detention records** — judgment, sentence, charges, case numbers 2. **Procedural history** — direct appeal and post-conviction outcomes at each level 3. **Trial record** — transcripts, motions, evidence relevant to claimed violations 4. **Custody details** — facility, prisoner ID, custodial official name and title 5. **Exhaustion documentation** — proof claims were presented to highest available state court 6. **AEDPA timeliness** — date conviction became final, any tolling events ## Quick Start 1. Identify petition type (§ 2254 / § 2241 / § 2255) from the custody and conviction posture. 2. Verify AEDPA one-year deadline under § 2244(d); document tolling. 3. Confirm exhaustion for each ground; flag unexhausted claims. 4. Draft each ground with its own constitutional provision, SCOTUS authority, record citations, and § 2254(d) showing. 5. 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 | Petition Type | Statute | Respondent | Venue | |---------------|---------|------------|-------| | State prisoner → federal court | § 2254 | State custodial officer | District of confinement | | Federal prisoner → sentence execution | § 2241 | Warden | District of confinement | | Federal prisoner → conviction | § 2255 | United States | Sentencing court | Address constitutional basis (Art. I, § 9; relevant amendments), AEDPA limitations period (§ 2244(d)), and successive petition bars (§ 2244(b)). ### IV. Statement of Facts Chronological narrative covering: - Arrest circumstances (Fourth Amendment issues) - Pre-trial proceedings (Fifth/Sixth Amendment concerns) - Trial type (jury/bench/plea), evidence, verdict - Sentencing (Eighth Amendment issues) - Direct appeal(s) — court, case number, decision, outcome - State post-conviction proceedings — court, case number, outcome ### V. Exhaustion of State Remedies | Ground | Trial Court | Intermediate Appeal | State Supreme Court | Status | |--------|-------------|---------------------|---------------------|--------| | 1 | [filing/date] | [case no./date] | [case no./date] | Exhausted / Excused | If unexhausted, argue excuse: absence of corrective process, futility, or ineffective process. Address mixed-petition issues per *Rose v. Lundy*, 455 U.S. 509. ### VI. Grounds for Relief Number each ground separately. Per ground: ``` GROUND [N]: [Constitutional right violated] Constitutional provision: [Amendment / clause] Clearly established law: [Controlling SCOTUS precedent] Facts: [Specific record citations] State court disposition: [How state court ruled] AEDPA showing: [Contrary to / unreasonable application — § 2254(d)(1)-(2)] Prejudice: [Substantial and injurious effect on verdict] ``` **Common grounds and controlling authority:** | Ground | Key Precedent | |--------|---------------| | Ineffective assistance of counsel | *Strickland v. Washington*, 466 U.S. 668 | | Brady violation | *Brady v. Maryland*, 373 U.S. 83 | | Confrontation Clause | *Crawford v. Washington*, 541 U.S. 36 | | Insufficient evidence | *Jackson v. Virginia*, 443 U.S. 307 | | Prosecutorial misconduct | *Darden v. Wainwright*, 477 U.S. 168 [VERIFY] | | Involuntary guilty plea | *Boykin v. Alabama*, 395 U.S. 238 | ### VII. Legal Argument For each ground, apply AEDPA standard (§ 2254(d)): 1. Identify clearly established federal law (SCOTUS holdings only) 2. Show state court decision was contrary to or unreasonably applied that law 3. Demonstrate error was not harmless — *Brecht v. Abrahamson*, 507 U.S. 619 (substantial and injurious effect) 4. Distinguish contrary authority ### VIII. Prayer for Relief - Issuance of writ directing release unless state acts within [time] - Alternative: new trial / new sentencing / vacation of conviction - Evidentiary hearing if factual disputes require development - Any other just and proper relief ### IX. Verification and Signature Declaration under penalty of perjury per 28 U.S.C. § 2254(a), signed by petitioner personally and dated. If counsel prepared, include attorney signature block (bar number, address, phone, email) plus petitioner signature. ### X. Exhibit Index | Exhibit | Description | |---------|-------------| | A | Judgment of conviction and sentence | | B | Direct appeal decision(s) | | C | Post-conviction petition(s) and order(s) | | D | Relevant transcript excerpts | | E+ | Supporting affidavits, documentary evidence | ## Guidelines - **AEDPA deference is the central hurdle** — frame every argument against § 2254(d)'s "contrary to" or "unreasonable application" standard; mere disagreement is insufficient. - Use only SCOTUS holdings as "clearly established federal law"; circuit precedent informs but cannot independently satisfy § 2254(d). - Verify § 2244(d) one-year limitations period; document statutory or equitable tolling. - Check successive petition restrictions under § 2244(b) — requires circuit court authorization. - Keep grounds factually and legally distinct; do not combine violations in one ground. - Cite the record for all factual assertions (transcript pages, exhibit numbers, docket entries). - Comply with local rules on page limits, formatting, and e-filing. - Mark unverified citations with [VERIFY]. ## Troubleshooting - **Missed AEDPA deadline**: Calculate from date conviction became "final" (direct appeal exhausted or certiorari period expired). Check for statutory tolling (§ 2244(d)(2)) during pending state post-conviction proceedings and equitable tolling under *Holland v. Florida*, 560 U.S. 631. - **Unexhausted claims in a mixed petition**: Consider filing a "protective" federal petition and requesting a stay under *Rhines v. Weber*, 544 U.S. 269 while returning to state court, or dismiss unexhausted claims and proceed on exhausted ones only. - **Successive petition barred**: Must obtain circuit court authorization showing new constitutional rule made retroactive or newly discovered evidence of actual innocence (§ 2244(b)(2)). - **No state court adjudication on the merits**: If the state court did not reach the merits, de novo federal review applies instead of AEDPA deference — *Cone v. Bell*, 556 U.S. 449. --- Key changes from the original: - **Description**: Converted to YAML block scalar (`>-`), added explicit trigger keywords per spec - **Added Quick Start**: 5-step decision workflow so an agent can orient immediately - **Added Troubleshooting**: 4 common failure scenarios with controlling authority (required by spec, was missing) - **Tightened prose**: Removed checkbox-style `- [ ]` markers from Statement of Facts (not interactive), compressed jurisdiction table column headers, shortened Verification section from paragraph to single sentence - **Preserved all domain accuracy**: Every statute, case citation, AEDPA standard, and legal workflow step is intact
Related Skills
paternity-petition
Drafts a Petition to Establish Paternity for family court filings. Covers court captions, standing allegations, factual bases, and relief requests with state-specific statutory requirements. Use when initiating paternity actions, child support petitions tied to parentage, custody filings requiring parentage determination, or birth certificate amendments.
modification-petition-summary
Produces structured summaries of U.S. family law modification petitions for attorney review. Captures existing order terms, requested changes, alleged material change in circumstances, supporting facts, evidence inventory, and procedural posture. Use when summarizing petitions to modify custody, visitation, child support, spousal support, or other post-judgment orders.
guardianship-petition
Drafts court-ready Petitions for Guardianship for US state courts, covering incapacity allegations, least-restrictive-alternative analysis, scope-of-authority requests, and statutory compliance. Use when drafting guardianship petitions, conservatorship filings, or petitions for appointment of guardian over incapacitated adults or minors.
expungement-petition
Drafts jurisdiction-specific petitions for expungement or sealing of criminal records. Covers caption construction, statutory eligibility analysis, rehabilitation narratives, and prayer for relief. Use when drafting expungement petitions, record-sealing motions, set-aside petitions, or certificates of rehabilitation in post-conviction proceedings.
dvro-petition
Drafts court-ready Domestic Violence Restraining Order petitions compiling chronological abuse incidents into element-driven pleadings supporting ex parte TRO and permanent protective order relief. Covers personal conduct orders, stay-away orders, custody/visitation, move-out orders, property control, and firearms relinquishment. Use when drafting DVRO petitions, protective order requests, ex parte TRO applications, or domestic violence pleadings.
dissolution-petition
Drafts a Petition for Dissolution of Marriage for filing in US state family courts. Covers jurisdictional standing, grounds, child custody and support, property and debt division, spousal support, and prayer for relief. Use when preparing initial divorce petitions, dissolution pleadings, or family law filing documents.
cert-petition
Drafts a Petition for Writ of Certiorari to the U.S. Supreme Court under Rules 10, 13, 14, and 33. Enforces Rule 10 criteria (circuit splits, precedent conflicts, important federal questions), jurisdictional verification under 28 U.S.C. §§ 1254/1257, timeliness, document structure, and booklet formatting. Use when seeking discretionary Supreme Court review, filing a cert petition, or drafting a writ of certiorari.
adoption-petition
Drafts a Petition for Adoption for U.S. family law courts (stepparent, relative, agency, independent). Use when drafting adoption petitions, initiating adoption proceedings, or preparing pre-filing adoption pleadings.
skill-name
Replace with a specific description of what this skill does and when to use it. Include keywords that help agents identify relevant tasks.
writing-surgical-consultation-notes
Creates structured surgical consultation responses with assessment and surgical candidacy determination. Use when responding to surgical consults, evaluating surgical candidates, or documenting surgical recommendations.
writing-operative-reports
Creates structured operative notes with findings, technique, specimens, and estimated blood loss. Use when dictating operative reports, documenting surgical procedures, or recording intraoperative findings.
writing-irb-submissions
Creates IRB submission packages with protocol summaries, consent forms, and risk-benefit analysis. Use when submitting to IRB, preparing ethics applications, or writing consent documents.