prompt-engineer
Original:🇺🇸 English
Translated
Professional prompt engineering, context engineering, and AI agent orchestration for coding agents (Claude Code, Codex, Cursor, Gemini CLI). Use when designing CLAUDE.md/AGENTS.md files, writing skills, planning multi-agent pipelines, optimizing token usage, managing session handoffs, or structuring any prompt for maximum agent performance. Do NOT use for general coding tasks or code review.
2installs
Sourcealicoder001/agent-skills
Added on
NPX Install
npx skill4agent add alicoder001/agent-skills prompt-engineerTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Prompt Engineer
Design high-performance prompts, context architectures, and agent orchestration strategies for AI coding agents.
Core Modes
- : Set up a project for AI-assisted development - generates CLAUDE.md, hooks, _memory/ directory, and session protocol. Run this FIRST on any new project.
bootstrap - : Design CLAUDE.md, AGENTS.md, skills, and rules files for a project.
context-architect - : Optimize token usage, compaction, handoff, and session continuity.
session-optimizer - : Design multi-agent planning and execution pipelines.
pipeline-designer - : Write or refine a specific prompt, skill, or agent definition.
prompt-crafter - : Audit existing prompt/context architecture and recommend improvements.
audit
Execution Workflow
1. Discover Intent
- Parse the requested from user input.
mode - If unclear, ask one concise question with options and a recommended default.
- Identify target: project setup, specific prompt, token issue, pipeline design, or session-enforcement gap.
2. Assess Current State
- Check existing files: ,
CLAUDE.md,AGENTS.md,.claude/skills/..claude/settings.json - Detect stack from /
package.json/ equivalent.tsconfig.json - Estimate startup token budget.
- If the project uses ,
_memory/progress.md, or_memory/todo.md, verify both:HANDOFF.md- prompt-level documentation
- enforcement path (hooks, scripts, settings, or explicit verification step)
3. Apply Mode-Specific Protocol
Route to the correct reference:
- ->
bootstrap(section 7: Bootstrap Templates)references/architecture.md - ->
context-architectreferences/architecture.md - ->
session-optimizerreferences/session-protocol.md - ->
pipeline-designerreferences/pipeline-patterns.md - ->
prompt-crafter(sections 1-6)references/patterns-and-audit.md - ->
audit(sections 7-8)references/patterns-and-audit.md
3a. Bootstrap Protocol (when mode is bootstrap
)
bootstrapThis mode generates the enforcement layer that makes all other modes effective.
- Detect stack: read ,
package.json,tsconfig.json, or equivalent.pyproject.toml - Detect existing config: check for CLAUDE.md, .claude/, _memory/, AGENTS.md.
- Generate files using templates from section "Bootstrap Templates".
references/architecture.md - If session continuity files exist, add a real verification path for them, not just prose instructions.
- Report what was created, token budget, and verification steps.
- Remind user: "Session protocol is now in CLAUDE.md. Automatic enforcement depends on hooks/scripts being configured and verified."
3b. Audit / Session-Optimizer Requirements
When the project relies on , , , compaction, or resumption:
progress.mdtodo.mdHANDOFF.md- NEVER call the setup "automatic" unless a real enforcement or verification layer exists.
- If behavior is documented only in prompts, report it as , not automated.
documented only - If hooks exist but do not verify the memory/handoff files, report it as .
partially enforced - Recommend the smallest enforcement mechanism that closes the gap:
- hook
- verification script
- project settings
- end-of-session check
4. Validate and Deliver
Before delivering, check:
- token budget estimate
- progressive disclosure
- no tool-enforceable rules trapped in prompt files
- cross-tool compatibility
- whether "automatic" claims are actually enforced
For each recommendation: state WHAT, WHY (with evidence), and HOW TO VERIFY.
Fundamental Laws
| # | Law | Key Evidence |
|---|---|---|
| 1 | Context is the scarcest resource. Budget tokens like embedded memory. | 80%+ = "dumb zone", hallucination spikes |
| 2 | Progressive disclosure over eager loading. Load what's needed now, not what might be needed. | ~15K tokens/session recovered (82% improvement) |
| 3 | Tools enforce, prompts guide. ESLint/Prettier/TSC/Hooks > CLAUDE.md rules. | Official hook systems now support deterministic lifecycle automation |
| 4 | Subagents are context multipliers. Reads 20 files, returns 1-2K summary. | Main context stays clean |
| 5 | Structure beats narrative. Bullets/tables > prose. | ~30% fewer tokens, ~40% better adherence |
| 6 | Verification enables autonomy. Give agent tests/linters/hooks/evals to self-check. | Without it, you are the only feedback loop |
Non-Negotiable Rules
NEVER:
- Propose CLAUDE.md >100 lines without explicit approval
- Put tool-enforceable rules in prompt files (use ESLint/Prettier/hooks/scripts)
- Load full docs into context (link, summarize, or skill-ify)
- Skip token budget estimation
- Write vague instructions ("write clean code") - must be verifiable
- Claim session continuity is automatic when the project only has prompt-level instructions
- Recommend destructive handoff cleanup by default
ALWAYS:
8. Include "Use when..." and "Do NOT use when..." in skill descriptions
9. Separate planning from execution in pipelines
10. Provide WHY for each recommendation
11. Test CLAUDE.md changes by observing behavior shift
12. Distinguish , , and
documentedpartially enforcedfully enforcedMode Routing Rules
- Route to when request says "set up project", "initialize", "bootstrap", or when CLAUDE.md and _memory/ do not exist yet.
bootstrap - Route to when request involves CLAUDE.md, AGENTS.md, skills setup, rules organization, or project-level agent configuration.
context-architect - Route to when request involves token costs, context filling up, session handoffs, compaction strategy, or "how to continue in new chat."
session-optimizer - Route to when request involves multi-agent workflows, planning-execution separation, task cards, or agent team coordination.
pipeline-designer - Route to when request targets a specific prompt, skill file, agent definition, or system prompt.
prompt-crafter - Route to when request asks to review, evaluate, or improve existing prompt/context setup.
audit - If CLAUDE.md exists but has no Session Protocol section, suggest running before proceeding.
bootstrap - If session continuity files exist but no enforcement path exists, bias toward +
audit.session-optimizer - If multiple modes apply, execute them in order: bootstrap -> audit -> architect -> crafter.
Output Contract
Return results in this structure:
Mode -> Current State Assessment -> Recommendations (with WHY) -> Token Impact -> Verification Steps -> DeliverablesLanguage Policy
- If user communicates in Uzbek, respond in Uzbek.
- All deliverable files (CLAUDE.md, SKILL.md, AGENTS.md) stay in English - they are consumed by AI agents.
- Comments and rationale can match user's language.
- If language preference is unclear, ask once, then remember.
Enforcement Principle
Skills are knowledge (Layer 3). But session behaviors (, , , compaction, lifecycle checks) MUST live at higher enforcement levels to work automatically:
progress.mdtodo.mdHANDOFF.mdHook / script / settings (Layer 0) -> deterministic enforcement
CLAUDE.md / AGENTS.md (Layer 1) -> project-wide default behavior
Skill (Layer 3) -> design knowledge, audit logic, templatesRun mode FIRST on any project to wire up the enforcement layers. Without bootstrap, the agent may know the process but still fail to apply it consistently.
bootstrapReferences
- Architecture & Enforcement
- Session Protocol
- Pipeline Patterns
- Patterns & Audit