
imperatives
Use when extracting imperatives from agent instruction files, analyzing rule coverage, or preparing input for /policy-algebra and /distill.
- Installs
- 296
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/camacho/ai-skills --skill imperatives- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads imperatives automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
/imperatives
Extract atomic imperatives (MUST/SHOULD/MAY) from markdown instruction files into JSONL.
Usage
/imperatives # default: ai-workspace/rules/*.md + AGENTS.md
/imperatives .claude/rules/*.md # specific globs
/imperatives --output imperatives.jsonl # write to file
Steps
-
Resolve files. Default:
ai-workspace/rules/*.mdandAGENTS.md. Expand globs to absolute paths. Zero matches → error, stop. -
Pass 1 — Script extraction (fast, deterministic).
node --import tsx "${SKILL_DIR}/scripts/extract-imperatives.ts" <files...> --output /tmp/imperatives-pass1.jsonl${SKILL_DIR}= this skill's base directory (shown in the "Base directory for this skill:" header above). Keyword-based: catches RFC 2119 terms + imperative verbs. ~80% coverage, <1s. -
Pass 2 — Subagent reasoning (catches implicit imperatives). For each file, dispatch a subagent to identify imperatives the regex missed — contextual rules, implicit constraints, prose-embedded obligations.
Subagent prompt:
Read
<file>. Here are the imperatives already extracted by the script for this file:<pass 1 JSONL lines where source.file matches>Identify additional imperative statements the regex missed. Look for:
- Implicit obligations hidden in prose (e.g., "The workflow is a menu, not a pipeline" implies MUST NOT enforce order)
- Contextual constraints (e.g., section context that makes a statement imperative)
- Conditional rules not triggered by keyword patterns
For each new imperative found, output one JSON line (same schema — id, level, polarity, subject, predicate, when, source, tool_scope, tags, raw). Do NOT duplicate entries already in pass 1. If none found, output nothing.
Use
subagent_type: "explorer"(Haiku) for most files. If a file had zero pass-1 imperatives OR contains dense prose (>50 lines without a keyword match), escalate that file to Sonnet for deeper reasoning. -
Merge passes. Concatenate pass 1 + pass 2 outputs. Deduplicate by
rawtext. Write final output to--output <path>or present inline. -
Present summary. Report in a table:
- Total count (pass 1 baseline + pass 2 additions)
- Breakdown by
levelandtool_scope - Files with zero imperatives after both passes
- Pass 2 additions highlighted separately
-
Downstream callers. If invoked by
/policy-algebraor/distill, return the JSONL path directly — skip the summary.
Failure modes
| Condition | Behavior |
|---|---|
| No files matched | Error message. Stop. |
| File not found | Script warns on stderr, continues with remaining files. |
| Zero imperatives | Report zero. Not an error. |
| Script exits non-zero | Surface stderr to user. |
Cross-tool notes
- Codex / Cursor: run the script directly — it's tool-agnostic.
FAQ
What does the imperatives skill do?
Use when extracting imperatives from agent instruction files, analyzing rule coverage, or preparing input for /policy-algebra and /distill.
How do I install imperatives?
Run npx skills add https://github.com/camacho/ai-skills --skill imperatives in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/imperatives/ (personal) or .claude/skills/imperatives/ (project).
Which AI agents can use imperatives?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is imperatives safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains imperatives?
It is published by camacho in camacho/ai-skills. It has 296 recorded installs.
More from camacho/ai-skills
archive
camacho/ai-skills
Fills Outcomes & Learnings in a plan file and renames it to .done.md.
bail
camacho/ai-skills
Reflects, updates GitHub Issue, closes PR if open, cleans up worktree/branch.
capture
camacho/ai-skills
Creates a draft GitHub Issue with triage label from natural language description.
plan-review
camacho/ai-skills
Auto-assembles review panel using deterministic rules, dispatches agents against plan file, collects verdicts.
orient
camacho/ai-skills
Fetches issue context, auto-detects task type, maps to branch prefix, presents brief.
reflect
camacho/ai-skills
Use after merging a branch or completing a task to consolidate learnings into memory layers, close out issues, and verify the phase gate.
Popular testing & qa skills
tdd
mattpocock/skills
Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.
grilling
mattpocock/skills
Grill the user relentlessly about a plan, decision, or idea. Use when the user wants to stress-test their thinking, or uses any 'grill' trigger phrases.
migrate-to-shoehorn
mattpocock/skills
Migrate test files from as type assertions to @total-typescript/shoehorn. Use when user mentions shoehorn, wants to replace as in tests, or needs partial test data.
run-train
lllllllama/rigorpilot-skills
Rigor Train skill for deep learning research repositories. Use when a documented or selected training command should be run conservatively for startup verification, short-run verification, full kickoff, or resume, with command, config, seed, log, checkpoint, status, and metric evidence written to standardized trainoutputs/. Do not use for environment setup, exploratory sweeps, speculative idea implementation, or end-to-end orchestration.
test-driven-development
obra/superpowers
Use when implementing any feature or bugfix, before writing implementation code
finishing-a-development-branch
obra/superpowers
Use when implementation is complete, all tests pass, and you need to decide how to integrate the work