a2a-python: Skill for Claude Code

.agents/skills/mistake-reflection/SKILL.md

mistake-reflection is a skill for Claude Code, Codex from a2aproject/a2a-python. It costs 60 tokens per session (1,209 once invoked), scanned A, original, Apache-2.0.

A procedure for recording mistakes made during coding-agent work in a project learning file. It also requires reviewing recent mistakes so the same problems are less likely to happen again.

In plain words
What is it for?
It helps document incorrect claims, failed tests, missing files, skipped required steps and statements that were not properly verified.
Why use it?
It turns corrections, failed checks and skipped instructions into a visible record instead of letting them disappear after the task. This helps the agent respond to errors systematically.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents); mentions AGENTS.md; mentions Gemini CLI.

This is a2aproject/a2a-python's own configuration. It tells Claude Code and Codex how to work on a2a-python itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything a2a-python configures →

About the project

a2a-python is a Python SDK for building software agents that communicate through the Agent2Agent protocol, including running them as A2A servers. It is for developers creating agentic applications and clients or servers that use JSON-RPC, HTTP/REST, or gRPC. The catalogue add-on supports workflows around this SDK.

a2aproject/a2a-python · 2,232 stars · on GitHub · a2a-protocol.org

Reuse

Borrowing it

Nothing to install: this file belongs to a2aproject/a2a-python. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/a2aproject/a2a-python/main/.agents/skills/mistake-reflection/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/a2aproject/a2a-python

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for mistake-reflection

README.md
[![agentmods](https://agentmods.dev/badge/skills/a2aproject/a2a-python/mistake-reflection/github.svg)](https://agentmods.dev/skills/a2aproject/a2a-python/mistake-reflection)
Your own site
<a href="https://agentmods.dev/skills/a2aproject/a2a-python/mistake-reflection"><img src="https://agentmods.dev/badge/skills/a2aproject/a2a-python/mistake-reflection/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for mistake-reflection

Your own site · 80×15
<a href="https://agentmods.dev/skills/a2aproject/a2a-python/mistake-reflection"><img src="https://agentmods.dev/badge/skills/a2aproject/a2a-python/mistake-reflection.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 60 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,209 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00060 $0.01209
Opus 5.5 $0.00024 $0.00484
Sonnet 5.5 $0.00012 $0.00242
Haiku 4.5 $0.00006 $0.00121

Measured 2mo ago against content hash 22e4f978515b, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

mistake-reflection scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/mistake-reflection/SKILL.md · 111 lines

How it starts

The opening of the file, as written. The whole thing — 111 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Mistake Reflection

Implements the mistake-handling step of AGENTS.md §"Mandatory workflow".

When to load this skill

Trigger on ANY of these, without waiting for the user to ask:

  • The user corrects a factual claim, code change, or assumption.
  • A tool result contradicts something you just stated or did (lint failure, test failure, type-check failure, file not found, command exit non-zero on something you said would succeed).
  • You re-read a file or doc and realize a prior statement was wrong or unverified.
  • You realize mid-task that you skipped a required step (e.g. didn't read docs/ai/coding_conventions.md, docs/ai/mandatory_checks.md, or docs/ai/evidence_rules.md at task start).
  • You stated an inference as a fact without a file:line citation and later had to walk it back.

If unsure whether something counts: it counts. False positives are cheap; false negatives are how the same mistake recurs.

Procedure

Do these in order. Do NOT defer to the end of the task.

  1. Acknowledge the mistake to the user explicitly in the current response. One or two sentences. No hedging, no minimization.
  2. Read recent entries in docs/ai/ai_learnings.md (at minimum the last 5 entries, or the whole file if shorter). If the current mistake is a recurrence of an existing rule, say so explicitly and reference the prior entry's date — do not silently duplicate.
  3. Append a new entry to docs/ai/ai_learnings.md using the template below. Append; do not rewrite existing entries.
  4. Continue the original task only after steps 1–3 are done.

Entry template

Copy this verbatim, fill in each field, append to the end of the file (after the existing --- separator):

## YYYY-MM-DD — <one-line summary>

- **Mistake**: What went wrong. Be concrete. Quote the wrong claim or
  describe the wrong action. Include `file:line` references where
  applicable.
- **Trigger**: How the mistake surfaced (user correction, tool output,
  self-review). Include the specific signal if it was a tool result.
- **Root cause**: Why it happened. Distinguish between (a) missing
  knowledge, (b) skipped verification step, (c) false assumption from
  pattern-matching, (d) workflow gap. Avoid generic "I didn't think
  carefully" — name the specific failure mode.
- **Recurrence of**: If this matches an existing rule, link to the
  prior entry's date. Otherwise write "new".
- **Rule**: A concrete, checkable rule that would have prevented this.
  Phrase as an imperative ("Before X, do Y"). If the rule already
  exists and was violated, the rule should be about *enforcement*
  (e.g. a check to add to a skill, a step to add to AGENTS.md), not a
  restatement of the existing rule.

Read the full file on GitHub · 111 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 111 lines · 60 tokens per session scan A 22e4f978515b

Subscribe to this mod's changes

mistake-reflection is a skill published in the GitHub repository a2aproject/a2a-python (2,232 stars, last pushed yesterday), licensed Apache-2.0. It adds 60 tokens to every session and 1,209 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

mistake-reflection compared with skills from other repositories

mistake-reflection next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
mistake-reflectiona2aproject/a2a-pythonSkill2.2kyesterdayApache-2.0A60Claude Code, Codex
frankfurtera2aproject/a2a-samplesSkill1.8k17d agoApache-2.0A14Claude Code, Codex
potpie-graphpotpie-ai/potpieSkill5.8k7d agoApache-2.0A107Codex
potpie-repo-baselinepotpie-ai/potpieSkill5.8k7d agoApache-2.0A75Claude Code, Codex
potpie-debug-memorypotpie-ai/potpieSkill5.8k7d agoApache-2.0A41Claude Code, Codex
lucid-agentsdaydreamsai/lucid-agentsSkill2013mo agoMITA75Codex
session-logstrpc-group/trpc-agent-goSkill1.9kyesterdayApache-2.0A20Claude Code, Codex