一键导入
ai-prompt-engineer
AI engineering skill for prompt optimization, context inference, and intelligent command routing across different models and use cases
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
AI engineering skill for prompt optimization, context inference, and intelligent command routing across different models and use cases
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Run the pragmatic-skeptic 'ponytail' reviewer over the current diff to surface over-engineering — code, abstractions, dependencies, files, or process steps the problem does not need. Read-only and advisory; never trims safety, security, accessibility, data-loss handling, or their tests. Use before pushing a PR, when a change feels heavier than the task warranted, or when boilerplate/a new dependency crept in. Triggers: 'ponytail review', 'is this over-engineered', 'what can I delete here', 'did I over-build this'.
Use this skill to run a structured user-discovery interview for Caro and save the transcript into docs/discovery/transcripts/ under the project's anonymization rules. Use when a new product line or major feature spec needs to clear Gate 1 of .claude/rules/validation-discipline.md (the 20-transcripts rule). Also use to synthesize transcripts into the hypothesis ledger after each batch of 5 interviews. Triggers - "run a discovery interview for <feature>", "log this user conversation as a Caro discovery transcript", "synthesize this week's transcripts into the hypothesis ledger".
Safely reclaim disk space in the caro project. Cleans Rust build cache, stale git worktrees (both .claude/worktrees/ and .worktrees/), empty stubs, and node_modules using a tiered audit that preserves any worktree with uncommitted changes, missing remotes, or a lock file. Use when du shows the project > 30 GB or disk free is low.
DEPRECATED 2026-05-16 — use caro-shell instead. This skill recommends the --backend claude flag and a ~/.config/caro/config.toml path that do not work on the current caro 1.4.0 binary, and its 522-line educational body is 4× the size of caro-shell for no benefit to an agent. Will be removed after 2026-08-01.
Use this skill when the user needs a POSIX shell command synthesized from natural language — "how do I find/grep/awk/find files modified in the last hour", "kill the process on port 3000", "tar this up excluding .git", or any other terminal-task-as-prose. Shells out to the `caro` CLI for safety-validated command inference and presents the suggestion for explicit approval. Refuses to execute the command itself.
Build, render, ship, AND MAINTAIN the caro landing-page demo video using Remotion. Use when creating, updating, re-rendering, extending the project demo MP4 at website/public/caro-demo.mp4 — or when responding to a drift alert from the caro-demo-drift CI workflow or a beads task with label `caro-demo-video`.
| name | ai-prompt-engineer |
| description | AI engineering skill for prompt optimization, context inference, and intelligent command routing across different models and use cases |
| version | 1.0.0 |
| allowed-tools | Read, Write, Edit, Glob, Grep, Bash, Task, WebSearch |
An AI engineering skill focused on optimizing prompts, improving context collection, and intelligently routing requests across different models, purposes, and layers of the agent loop.
This skill addresses the core challenge: users shouldn't need to over-provide information. Caro should infer context intelligently and serve users with minimal friction. This skill guides the systematic improvement of:
Invoke this skill when working on:
User queries fall into distinct categories that require different handling:
| Category | Description | Examples | Key Signals |
|---|---|---|---|
| Terminal Exploration | Navigating, listing, searching the filesystem | "what's in this folder", "find large files" | Navigation verbs, location references |
| Runbook Execution | Project-specific workflows based on history | "run the build", "deploy to staging" | Project context, command history patterns |
| Language Development | Language-specific development tasks | "compile this", "run tests" | File extensions, project markers (Cargo.toml, package.json) |
| DevOps Flow | Deployment, CI/CD, infrastructure | "push to prod", "check k8s pods" | DevOps tools (docker, kubectl), env references |
| Casual Scripting | Quick one-off tasks | "unzip this file", "rename these files" | Simple verbs, single file/pattern references |
| CLI Tool Interaction | Using specific command-line tools | "git status", "npm install" | Tool names, tool-specific vocabulary |
Extract context in priority order:
"The file type is the strongest hint for tool selection"
When a user references a file, the extension often determines the appropriate tool:
Archive Example:
.tar.gz, .tgz → tar -xzf (Linux/macOS).zip → unzip (macOS), 7z x or Expand-Archive (Windows).rar → unrar (requires installation).7z → 7z x (requires 7-zip)The Anti-Pattern:
User on macOS: "extract this archive"
File: document.zip
BAD: tar -xzf document.zip (wrong tool for file type)
GOOD: unzip document.zip (matches file type + platform)
1. Read the user query
2. Identify category from Query Taxonomy
3. Extract explicit references (files, tools, paths)
4. Note implicit signals (verbs, modifiers, context words)
5. Document the analysis
1. Check if file reference exists → extract extension
2. Detect platform from ExecutionContext
3. Identify project type from cwd markers
4. Review session history for patterns
5. Build context signal map
1. Use file-type-to-tool mappings (see references/file-tool-map.md)
2. Filter by platform availability
3. Consider user preferences if known
4. Rank options by confidence
5. If ambiguous, prepare clarifying question
1. Select appropriate prompt template for category
2. Inject inferred context
3. Constrain output space based on mappings
4. Add platform-specific rules
5. Format for target model (SmolLM ChatML, etc.)
1. Run against test cases in evaluation harness
2. Measure improvement vs baseline
3. Document patterns that work
4. Update mappings and templates
5. Create regression tests for fixed cases
| Document | Purpose |
|---|---|
references/query-taxonomy.md | Detailed breakdown of query categories with detection signals |
references/file-tool-map.md | File extension to tool mappings by platform |
references/context-inference.md | Patterns for inferring context from minimal input |
references/prompt-templates.md | Category-specific prompt optimization templates |
examples/case-studies.md | Real-world optimization examples |
This skill integrates with:
/src/prompts/ - Prompt building and capability profiling/src/context/mod.rs - Execution context detection/src/evaluation/ - Testing improvements against baseline/tests/evaluation/dataset.yaml - Test case datasetsScenario: User on macOS in a Rust project asks "extract the dependency archive"
Query Analysis:
- Category: Casual Scripting (simple verb, file reference)
- Explicit: "dependency archive"
- Implicit: extraction intent
Context Signals:
- Platform: macOS (BSD tools, unzip available)
- CWD: /Users/dev/myproject (Cargo.toml present → Rust project)
- Files matching "archive": vendor.tar.gz, deps.zip
Ambiguity Detection:
- Multiple archive files found
- Different formats require different tools
Resolution Options:
1. Ask: "Which archive? vendor.tar.gz or deps.zip?"
2. Or list both commands with explanations
If deps.zip selected:
- Tool: unzip (matches .zip + macOS)
- Command: unzip deps.zip
- NOT: tar -xzf deps.zip (wrong tool!)
file-tool-map.md with more file types and edge cases