agent-engineering
БесплатноБез исполняемых скриптовНе проверенBattle-tested engineering principles for AI coding agents. Covers plan-first workflow, subagent delegation, self-improvement loops, verification gates…
от ckorhonen★ 35 звёзд на GitHubОб этом скилле
Agent Engineering Principles
Battle-tested principles for AI coding agents that produce reliable, high-quality work.
When to Use This Skill
- Writing or reviewing an
AGENTS.md/CLAUDE.md/CURSOR.mdfile for a project - Configuring a new AI coding agent or subagent
- Diagnosing why an agent keeps making the same mistakes
- Reviewing agent output quality and identifying systemic issues
- Onboarding an agent to a complex codebase
1. Plan Mode Default
- Enter plan mode for ANY non-trivial task (3+ steps or architectural decisions)
- If something goes sideways, STOP and re-plan immediately — don't keep pushing
- Use plan mode for verification steps, not just building
- Write detailed specs upfront to reduce ambiguity
When to skip: Simple, single-file edits with obvious solutions.
Example plan format (tasks/todo.md):
## Task: Migrate auth to JWT
### Plan
- [ ] Audit current session-based auth flow
- [ ] Design JWT payload schema (user_id, roles, expiry)
- [ ] Implement token generation in auth service
- [ ] Update middleware to validate JWT
- [ ] Write tests for edge cases (expired, invalid, revoked)
- [ ] Update docs
### Done
- [x] Audit complete — 4 routes need updating
2. Subagent Strategy
- Use subagents liberally to keep main context window clean
- Offload research, exploration, and parallel analysis to subagents
- For complex problems, throw more compute at it via subagents
- One task per subagent for focused execution
Key insight: Context window pollution is the #1 cause of agent quality degradation. Subagents are cheap — use them.
When to spawn a subagent vs. do it inline:
| Use a subagent | Do inline |
|---|---|
| Research task (>10 files) | Simple 1-file edit |
| Independent parallel work | Quick config change |
| Long-running compilation or test run | Single command with clear output |
| Isolated experiment (risky change) | Trivial refactor |
3. Self-Improvement Loop
After ANY correction from the user:
- Update
tasks/lessons.md(or equivalent) with the pattern - Write rules for yourself that prevent the same mistake
- Ruthlessly iterate on these lessons until mistake rate drops
- Review lessons at session start for relevant project
Lessons Format
## Lesson: [Short title]
- **Trigger:** What went wrong
- **Rule:** What to do instead
- **Added:** [date]
Example lesson:
## Lesson: Don't mutate shared config objects
- **Trigger:** Modified `config.defaults` directly, breaking other callers
- **Rule:** Always deep-clone config before modifying; treat config objects as read-only
- **Added:** 2026-03-15
This is the most underused agent pattern. Most agents make the same mistakes repeatedly because they have no feedback mechanism. A lessons file closes the loop.
4. Verification Before Done
- Never mark a task complete without proving it works
- Diff behavior between main and your changes when relevant
- Ask yourself: "Would a staff engineer approve this?"
- Run tests, check logs, demonstrate correctness
Anti-pattern: "I've made the changes" without evidence they work.
Verification checklist before marking done:
- Tests pass (
npm test/pytest/go test ./...) - No new lint errors
- Manual smoke test of the changed code path
- Diff reviewed for unintended changes
- Edge cases (empty input, error paths, concurrent access) considered
5. Demand Elegance (Balanced)
- For non-trivial changes: pause and ask "is there a more elegant way?"
- If a fix feels hacky: "Knowing everything I know now, implement the elegant solution"
- Skip this for simple, obvious fixes — don't over-engineer
- Challenge your own work before presenting it
The balance: Elegance matters for code that will be maintained. For throwaway scripts, ship it.
Elegance signals: Code reads like prose. New engineers understand it without explanation. The abstraction boundaries are obvious. There's nothing to add, and nothing to remove.
Over-engineering signals: 3 abstraction layers for a 20-line problem. Generic framework for a one-time use. "We might need this later" reasoning.
6. Autonomous Bug Fixing
- When given a bug report: just fix it. Don't ask for hand-holding
- Point at logs, errors, failing tests — then resolve them
- Zero context switching required from the user
- Go fix failing CI tests without being told how
Rule of thumb: If you can see the error and understand the codebase, fix it. Only ask when genuinely blocked.
Blocked means:
- The fix requires a product/UX decision (not a technical one)
- You need access/credentials you don't have
- Two reasonable fixes have significantly different tradeoffs and the owner should choose
7. Task Management Cycle
For any non-trivial task, follow this 6-step cycle:
- Plan First: Write plan to
tasks/todo.mdwith checkable items - Verify Plan: Check in before starting implementation
- **Trac
Установить agent-engineering в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл agent-engineering?
Battle-tested engineering principles for AI coding agents. Covers plan-first workflow, subagent delegation, self-improvement loops, verification gates, elegant solutions, autonomous bug fixing, and structured task management. Use when configuring agent behavior, writing AGENTS.md files, or improving agent reliability and code quality.
Как установить скилл agent-engineering?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл agent-engineering запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic