CLI Prompt Management Tool - Guides and Documentation
This explains how to create instruction files (prompt files) used with Climpt.
Instructions are markdown files that define directives for AI. They follow the C3L (Climpt 3-word Language) path convention (see 00-1-concepts.md for details).
Command format: climpt-<c1> <c2> <c3> [options]
Examples:
climpt-git decide-branch working-branch
climpt-meta create instruction
climpt-code review pull-request
meta create instruction – Enter purpose, domain, action, target to
generate a prompt file templatemeta build frontmatter – Generate C3L v0.5 compliant frontmatter and
insert at file beginning/reg) – Regenerate registry.json so the command
becomes available via MCP/CLIclimpt-meta create instruction << 'EOF'
Purpose: Analyze code complexity
Domain: code
Action: analyze
Target: complexity
Description: Calculate cyclomatic complexity and provide improvement suggestions
EOF
You can also request in natural language within Claude Code:
Create a new Climpt instruction.
- Purpose: Code complexity analysis
- Domain: code
- Action: analyze
- Target: complexity
Please use meta create instruction.
This command generates:
.agent/climpt/prompts/code/analyze/complexity/.agent/climpt/prompts/code/analyze/complexity/f_default.md.agent/climpt/config/code-app.yml,
code-user.yml.deno/bin/climpt-codeGenerate C3L v0.5 compliant frontmatter for the created prompt file.
echo "Domain: code
Action: analyze
Target: complexity
Purpose: Calculate cyclomatic complexity and provide improvement suggestions" | climpt-meta build frontmatter
---
c1: code
c2: analyze
c3: complexity
title: Analyze Code Complexity
description: Calculate cyclomatic complexity and provide improvement suggestions
usage: climpt-code analyze complexity
c3l_version: "0.5"
options:
edition:
- default
adaptation:
- default
- detailed
file: true
stdin: false
destination: false
---
c3l_version in quotes: "0.5"title and description must be in EnglishInsert the generated frontmatter at the beginning of the prompt file.
After creating/updating prompt files, regenerate the registry.
/reg
Or via CLI:
deno task generate-registry
# Or: deno run --allow-read --allow-write --allow-env jsr:@aidevtool/climpt/reg
Verify the new command is registered:
cat .agent/climpt/registry.json | jq '.tools.commands[] | select(.c1 == "code")'
.agent/climpt/prompts/<domain>/<action>/<target>/
├── f_default.md # Default version
├── f_detailed.md # Detailed version (optional)
└── f_<edition>.md # Other variations
| Filename | Description | Usage Condition |
|---|---|---|
f_default.md |
Default | When --edition not specified |
f_<edition>.md |
Specific edition | When --edition=<edition> specified |
f_<edition>_<adaptation>.md |
Combination | When both specified |
Variables available in prompts:
| Variable | CLI Option | Description |
|---|---|---|
{input_text} |
STDIN | Text from standard input |
{input_text_file} |
--from (or -f) |
Input file path |
{destination_path} |
--destination (or -o) |
Output destination path |
{uv-*} |
--uv-* |
Custom variables |
Create a git branch decision command:
# Step 1: Create instruction
climpt-meta create instruction << 'EOF'
Purpose: Determine branch strategy based on task content
Domain: git
Action: decide-branch
Target: working-branch
Description: Decide whether to create new branch or continue on current branch
EOF
# Step 2: Generate frontmatter
climpt-meta build frontmatter << 'EOF'
Domain: git
Action: decide-branch
Target: working-branch
Purpose: Decide branch strategy based on task content
EOF
# Step 3: Update registry
deno task generate-registry