benbrastmckie/nvim/skill-books-implementation-hard
Claude Code and agent skill by benbrastmckie/nvim
- community
Checking that the SKILL.md file is still in the repository.
Implement lean-book changes with hard-mode contracts (H2 anti-analysis, H7 territory, H9 wrap-up discipline). Invoke for --hard books implementation tasks.
Install
npx vskill@latest install benbrastmckie/nvim/skill-books-implementation-hardSKILL.md
Books Implementation Hard Skill
Hard-mode wrapper that delegates books implementation to books-implementation-hard-agent subagent. Extends skill-books-implementation with:
- Territory parameters (H7): includes territory contract when dispatched from orchestrate-hard
- Anti-analysis contract (H2): passed in delegation context for agent enforcement
- Wrap-up discipline (H9):
.orchestrator-handoff.jsonalways written by the agent
Relationship to base skill: Structurally follows skill-books-implementation's postflight pattern. Key difference: when orchestrator_mode=true, uses per-phase dispatch (H1) rather than whole-plan dispatch, same as books:certify's shared routing — no separate certify skill exists here either. Maintenance note: changes to skill-books-implementation postflight should be mirrored here.
Context References
Reference (do not load eagerly):
- Path:
.claude/context/formats/return-metadata-file.md- Metadata file schema - Path:
.claude/context/contracts/anti-analysis.md- H2 contract (loaded by agent) - Path:
.claude/context/contracts/wrap-up.md- H9 contract (loaded by agent) - Path:
.claude/context/contracts/territory.md- H7 contract (when territory params present) - Path:
.claude/context/contracts/phase-closure.md- depth-first phase closure (loaded by agent) - Path:
.claude/context/contracts/pre-edit-gate.md- per-item evidence before a mechanical-list edit (loaded by agent) - Path:
.claude/context/patterns/postflight-control.md- Marker file protocol - Path:
.claude/context/patterns/subagent-continuation-loop.md- Continuation loop pattern
Trigger Conditions
This skill activates when:
/implement N --hardis invoked and task type isbooks(orbooks:certify)- Note:
skill-orchestrate's own hard-mode dispatch (both effort modes, one engine) resolves
and dispatches the AGENT (books-implementation-hard-agent) directly via command-route-agent.sh, not this SKILL file; this skill's own activation is via direct invocation
Execution Flow
Stage 1: Input Validation
Stage 1.5: Hard-Mode Cost Note
Stage 2 + Stage 3: Preflight Status Update and Postflight Marker
Source skill-base.sh once, then follow @.claude/context/patterns/skill-preflight-flow.md in full for Stage 2 (preflight status update) and Stage 3 (marker creation):
Stage 4a: Memory Retrieval and Literature Detection
Follow @.claude/context/patterns/lit-stage4a-flow.md in full to resolve --lit and set lit_context.
Stage 4: Prepare Delegation Context
Include task_context, plan_path, metadata_file_path, effort_flag: "hard", gate_flag (forwarded unchanged from the dispatch context, defaulting to false when absent — the advisory gate tier is opt-in and this skill never decides it), and — when the dispatch originates from skill-orchestrate --hard — the territory/concurrent_siblings parameters it supplies. If memory_context and/or lit_context from Stage 4a are non-empty, include them in the prompt. Do NOT inject an empty block for either.
Stage 5: Invoke Subagent
Use Agent tool with subagent_type: "books-implementation-hard-agent".
Stage 5b: Self-Execution Fallback
Follow @.claude/context/patterns/skill-self-execution-fallback.md in full. This skill's success status value for that block's write obligation is "implemented".
Self-review before writing metadata: identical to skill-books-implementation's Stage 5b self-review — re-read every file the inline path touched against rules/books.md's six non-negotiables before writing status: "implemented".
Postflight (ALWAYS EXECUTE)
Stage 6: Parse Subagent Return
Read the metadata file from specs/{N}_{SLUG}/.return-meta.json, including memory_candidates.
Stage 6d: Advisory Gate Tier Surface (Read from Metadata)
Read the agent-recorded gate block, if any, from metadata and surface it. The gate invocation itself was performed by the agent in its Stage 5 Final Verification — this stage reads that recorded result and MUST NOT re-run it, per @.claude/context/standards/postflight-tool-restrictions.md and this skill's own "MUST NOT (Postflight Boundary)" section below. This stage does not invoke books-gate.sh, does not run a build, and does not grep source.
Asymmetry note (deliberate, not an omission): unlike a compliance_check == "failed" branch, which sets status="partial", this stage MUST NOT assign status on any gate status, however severe. The tier is advisory-only by binding design decision — see ### gate (optional) in @.claude/context/formats/return-metadata-file.md. It ADDS a cheap intermediate tier below the existing fail-closed one; it relaxes nothing.
Gate-tier background — plain pointers, read on demand, never eager imports: context/project/books/domain/gate-tiers.md and context/project/books/tools/certify-guide.md.
Stage 7, 7a, 8, 8a, 9: Postflight Status, Memory Candidates, Artifact Linking, Notify, Cleanup
Follow @.claude/context/patterns/skill-postflight-flow.md in full: field_name=**Summary**, next_field=**Description**.
Error Handling
Input Validation Errors
Return immediately if task not found or wrong task type.
Metadata File Missing
Keep status as "implementing", report error.
Git Commit Failure
Non-blocking: Log failure but continue.
MUST NOT (Postflight Boundary)
Identical to skill-books-implementation's postflight boundary: no editing book/Lean/TOML files, no running lake build/books-tool, no analysis, no artifact authoring. See that skill's own section for the full list.
Reference: @.claude/context/standards/postflight-tool-restrictions.md
Return Format
Brief text summary (NOT JSON).
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingagent-system/extensions/books/skills/skill-books-implementation-hard/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/benbrastmckie/nvim/skill-books-implementation-hard)