AGENT SKILL

xp

Extreme Programming adapted for AI-human pair development. Use whenever the user wants to work in a structured, iterative way with their AI agent — mentions XP, extreme programming, pair programming, agile, YAGNI, simple design, continuous refactoring, or wants to plan before coding. Also use when the user wants to build features incrementally with tests, feedback loops, and clear role division between human and AI. This skill is the AI-era evolution of pair programming.

License 许可
MIT
最近更新
2026-07-16
Stars
★ 0
Forks
0

01 前言 Front Matter

name
xp
description
Extreme Programming adapted for AI-human pair development. Use whenever the user wants to work in a structured, iterative way with their AI agent — mentions XP, extreme programming, pair programming, agile, YAGNI, simple design, continuous refactoring, or wants to plan before coding. Also use when the user wants to build features incrementally with tests, feedback loops, and clear role division between human and AI. This skill is the AI-era evolution of pair programming.

02 资源文件 2

03 SKILL.md 正文

XP — Extreme Programming with AI Agents

Philosophy

Extreme Programming takes good software engineering practices and turns them up to 11. Code reviews become continuous (pair programming). Testing becomes relentless (TDD). Design improvement becomes constant (refactoring). Planning becomes frequent (small releases).

With AI agents, XP evolves further. The AI doesn't get tired, doesn't lose focus, and can review every line of code as it's written. But the human brings judgment, domain knowledge, and the ability to say "no." The pair — human + AI — is more powerful than either alone, but only when they work together with clear roles and shared values.

This skill is the methodology that governs how you and your AI agent collaborate. It is not a tool or a framework — it is a discipline.

The Five Values

These are the foundation. Every practice and every workflow decision traces back to these.

Communication

In traditional XP, developers talk constantly. With an AI agent, communication means:

  • Share context explicitly. The AI doesn't have your mental model. Describe what you're building, why, and what "done" looks like before starting.
  • Read before writing. Always understand the existing codebase before proposing changes. The AI should explore the project structure, read relevant files, and understand conventions first.
  • Ask, don't assume. When requirements are unclear, ask the human. A 30-second question saves a 30-minute wrong implementation.
  • Explain your reasoning. When the AI makes a decision, it should articulate why — not just what. This gives the human the ability to course-correct.

Simplicity

The YAGNI principle — You Aren't Gonna Need It. This is perhaps the most important practice to internalize when working with an AI, because AI agents are very good at generating code and can easily over-engineer if not guided.

  • Build only what's needed today. Don't add "flexibility" for a future that may never come.
  • One test, one implementation. Each cycle should be the smallest possible unit of progress.
  • Delete code fearlessly. If something isn't used, remove it. The AI should propose deletion of dead code, not just addition of new code.
  • Simplest thing that works. Before proposing a clever solution, ask: does a straightforward approach work? Often it does.

Feedback

Kent Beck said: "Optimism is an occupational hazard of programming. Feedback is the treatment."

  • Run tests and lint after every change. No exceptions. If a project has a test command, run it. If it has a linter, run it. If you're unsure, ask the user.
  • Show, don't tell. When the AI completes a task, the human should see the result — run the code, show the output, demonstrate the test passing.
  • Fast feedback loops. Keep each cycle short enough that the human can review and redirect within minutes, not hours.
  • Verify assumptions. If the AI is unsure about a library API, a file path, or a convention, check it — don't guess.

Courage

With an AI agent, you can afford to be bolder than you'd be alone.

  • Refactor without fear. The AI can refactor large sections while tests confirm correctness. Refactor ruthlessly, not cautiously.
  • Throw away bad code. If a direction isn't working, delete it and start over. Sunk cost is a trap the AI doesn't have — use that advantage.
  • Try experiments. The AI can prototype three approaches in the time it takes a human to try one. Use this for exploration.
  • Push back. If the human's request would lead to a bad design, the AI should say so — respectfully, with reasoning, but firmly.

Respect

Respect flows in both directions in the pair.

  • Follow project conventions. Read existing code, match its style, use its patterns. Don't impose external idioms.
  • Understand before changing. Never modify code you haven't read. Never propose architecture you haven't explored.
  • Respect the human's time. Don't generate walls of code without explanation. Don't run expensive commands without asking. Don't commit without permission.
  • Preserve intent. When refactoring, the behavior must stay the same. The code should become clearer, not just different.

Workflow

1. Plan — Define One Small Task

Pick the smallest possible piece of work that delivers value. Write it as a clear, specific goal:

Bad:  "Add authentication"
Good: "Add a login endpoint that accepts email+password and returns a JWT"

Before starting, confirm with the human:

  • What does "done" look like?
  • Which behaviors matter most?
  • Are there constraints or conventions to follow?

2. Test — Write One Test

Write a single test that describes the expected behavior. The test should fail — this confirms you're testing the right thing. Follow the TDD skill for the detailed red-green-refactor loop.

RED: Write one test → test fails

3. Implement — Minimal Code to Pass

Write the simplest code that makes the test pass. Nothing more.

GREEN: Minimal implementation → test passes

4. Refactor — Improve While Green

Now that the test passes, clean up. Look for:

  • Duplication to extract
  • Names that could be clearer
  • Structure that could be simpler
  • Opportunities for better abstraction (but only if needed now)

Run tests after each refactor step. Never refactor while red.

REFACTOR: Clean up → all tests still pass

5. Release — Commit the Increment

Commit the work as a coherent unit. Small, focused commits with clear messages. Then pick the next task and repeat.

Continuous Practices

These aren't steps in the workflow — they're habits that run throughout every session:

  • Read the codebase first. Before touching anything, explore. Use glob, grep, and read to understand what exists.
  • Run lint and tests. After every meaningful change. If the project has a CI command, use it.
  • Follow conventions. Match the style of surrounding code. If there's a linter config, respect it.
  • Stay small. If a task feels big, split it. Each cycle should take minutes, not hours.
  • Communicate constantly. Explain what you're doing, why you chose an approach, and what tradeoffs exist.

References

  • practices.md — The 12 XP practices adapted for AI-human pairing
  • roles.md — Driver/Navigator dynamics, anti-patterns, and pairing variations
  • Use the tdd skill for the detailed test-driven development loop

04 同仓库更多 Skills

haryelramalho
haryelramalho/skills

to-prompt-opus

Use when preparing or rewriting prompts for Claude Opus 4.8, Anthropic API agents, XML-structured prompts, long-context document work, coding agents, research synthesis, frontend/design tasks, or model-specific prompt optimization. Do not use for GPT/OpenAI prompts or raw context packaging without Opus-specific tuning.

★ 0
haryelramalho
haryelramalho/skills

to-prompt-gpt

Use when preparing or rewriting prompts for GPT-5.5, OpenAI API agents, Responses workflows, coding agents, research synthesis, support assistants, or model-specific prompt optimization. Do not use for Claude/Opus prompts or raw context packaging without GPT-specific tuning.

★ 0
haryelramalho
haryelramalho/skills

plan-refactor-qa

Plans and runs qa-report before executing Compozy refactor tasks. Use when the user provides a refactor or issue slug and wants Codex to inspect the matching .compozy/tasks directory, related PRD/TechSpec/ADR/task artifacts, affected code, and existing tests, then invoke $qa-report with a repository-grounded prompt. Do not use to run tests, execute qa-execution, implement code, or perform post-refactor verification.

★ 0
haryelramalho
haryelramalho/skills

multi-tool-branch-review

Orchestrates a multi-tool branch review of the current git branch against a base branch. By default it runs two independent thermo-nuclear maintainability audits, one on Codex GPT-5.5 xhigh and one on Claude Opus xhigh, then consolidates the findings into a single remediation plan via writing-plans. If the user explicitly asks for native reviews, it can add the Claude native review pass, the Codex native review pass, or both. Use when the user wants a deep cross-model review of a branch or PR before merge, or asks to review this branch with multiple tools or models. Encodes known infra failure modes and their fixes (missing Claude ACP adapter, Codex MCP auth hangs, false-positive report files, long jobs orphaned inside subagents). Do not use for reviewing a single uncommitted snippet, for non-git work, for running only one reviewer, or when the user only wants a quick lint or test run.

★ 0
haryelramalho
haryelramalho/skills

create-pr-with-template

Create a GitHub Pull Request with gh CLI and prefer repository PR templates automatically. Use this whenever the user asks to open/create a PR, especially when template compliance is needed. If multiple templates exist, ask the user which template to use.

★ 0
haryelramalho
haryelramalho/skills

ui-craft

Provides guardrails for user-facing UI work: usability heuristics, accessibility floors, design-system discipline, component states, microcopy, motion, dark mode, responsive behavior, and human-AI UX. Use when designing, generating, reviewing, or refactoring visible product surfaces such as components, pages, dashboards, forms, dialogs, loading/empty/error states, or AI interfaces. Do not use for backend-only work, infrastructure, CLI/TUI design, or pure documentation editing.

★ 0