Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
camacho avatar

Imperatives

  • 296 installs
  • 1 repo stars
  • Updated May 26, 2026
  • camacho/ai-skills

imperatives is a Claude Code skill from camacho/ai-skills that authors and enforces imperative-style agent directives so sessions follow fixed execution rules, guardrails, and step order across repos.

About

imperatives is an agent-governance skill in camacho/ai-skills that teaches Claude to write and apply imperative directives—must-run steps, forbidden actions, and ordered workflows—that persist across coding sessions and repositories. Instead of soft suggestions, imperatives frames rules as non-negotiable commands agents must follow before editing files, running shell commands, or opening pull requests. Platform and developer-experience teams reach for imperatives when standardizing Claude Code behavior for monorepos, regulated environments, or shared agent playbooks. The skill complements CLAUDE.md and hook systems by making execution order and guardrails explicit enough for automated enforcement.

  • Defines non-negotiable agent directives
  • Standardizes imperative instruction patterns
  • Reduces ambiguous or skipped agent steps
  • Pairs with camacho/ai-skills workflow skills
  • Improves repeatability across repositories

Imperatives by the numbers

  • 296 all-time installs (skills.sh)
  • Ranked #2,276 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
  • Data as of Jul 28, 2026 (Skillselion catalog sync)
npx skills add https://github.com/camacho/ai-skills --skill imperatives

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs296
repo stars1
Last updatedMay 26, 2026
Repositorycamacho/ai-skills

How do you enforce non-negotiable rules in Claude Code?

Author and enforce imperative-style agent directives so Claude Code sessions follow non-negotiable execution rules, guardrails, and step order across repos.

Who is it for?

Developer-platform teams standardizing Claude Code behavior with mandatory steps and guardrails across multiple repositories.

Skip if: Solo experiments where informal chat instructions are enough and no shared agent policy must be enforced.

When should I use this skill?

A developer asks to write imperative agent rules, enforce guardrails, or standardize Claude Code execution order across repos.

What you get

Imperative directive blocks, guardrail specs, and ordered agent execution steps checked into repo config.

  • Imperative directive files
  • Guardrail specifications

Files

SKILL.mdMarkdownGitHub ↗

/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

1. Resolve files. Default: ai-workspace/rules/*.md and AGENTS.md. Expand globs to absolute paths. Zero matches → error, stop.

2. 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.

3. 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.

4. Merge passes. Concatenate pass 1 + pass 2 outputs. Deduplicate by raw text. Write final output to --output <path> or present inline.

5. Present summary. Report in a table:

  • Total count (pass 1 baseline + pass 2 additions)
  • Breakdown by level and tool_scope
  • Files with zero imperatives after both passes
  • Pass 2 additions highlighted separately

6. Downstream callers. If invoked by /policy-algebra or /distill, return the JSONL path directly — skip the summary.

Failure modes

ConditionBehavior
No files matchedError message. Stop.
File not foundScript warns on stderr, continues with remaining files.
Zero imperativesReport zero. Not an error.
Script exits non-zeroSurface stderr to user.

Cross-tool notes

  • Codex / Cursor: run the script directly — it's tool-agnostic.

Related skills

How it compares

Pick imperatives when agent behavior must be mandatory and ordered, not just documented as soft guidance.

FAQ

What are imperatives in camacho/ai-skills?

imperatives are mandatory agent instructions—ordered steps and hard guardrails—that Claude Code must follow, framed as commands rather than optional suggestions in session prompts.

How do imperatives differ from CLAUDE.md?

imperatives focus on non-negotiable execution order and forbidden actions for agents, while CLAUDE.md often carries broader project context; imperatives tighten behavioral enforcement.

AI & Agent Buildingagentsautomationllm

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.