ai-context-engineering-for-qa: Skill for Claude Code

.claude/skills/improve-context-from-sessions/SKILL.md

improve-context-from-sessions is a skill for Claude Code from vlad-ryzhkov/ai-context-engineering-for-qa. It costs 94 tokens per session (1,970 once invoked), scanned A, original, Unlicense.

A retrospective workflow that reviews an agent session for corrections, tool mistakes, and successful approaches, then proposes updates to AI rules, skills, and documentation. It asks for consent before capturing learnings and does not create new skills.

In plain words
What is it for?
Use it after a task, merge, or review fix to propose improvements to the project’s agent instructions and supporting documents.
Why use it?
It turns lessons from completed work into small context updates while avoiding automatic changes or publishing without approval.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths; mentions CLAUDE.md.

This is vlad-ryzhkov/ai-context-engineering-for-qa's own configuration. It tells Claude Code how to work on ai-context-engineering-for-qa 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 ai-context-engineering-for-qa configures →

Reuse

Borrowing it

Nothing to install: this file belongs to vlad-ryzhkov/ai-context-engineering-for-qa. 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/vlad-ryzhkov/ai-context-engineering-for-qa/main/.claude/skills/improve-context-from-sessions/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/vlad-ryzhkov/ai-context-engineering-for-qa

Made for: Claude Code.

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 improve-context-from-sessions

README.md
[![agentmods](https://agentmods.dev/badge/skills/vlad-ryzhkov/ai-context-engineering-for-qa/improve-context-from-sessions/github.svg)](https://agentmods.dev/skills/vlad-ryzhkov/ai-context-engineering-for-qa/improve-context-from-sessions)
Your own site
<a href="https://agentmods.dev/skills/vlad-ryzhkov/ai-context-engineering-for-qa/improve-context-from-sessions"><img src="https://agentmods.dev/badge/skills/vlad-ryzhkov/ai-context-engineering-for-qa/improve-context-from-sessions/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 improve-context-from-sessions

Your own site · 80×15
<a href="https://agentmods.dev/skills/vlad-ryzhkov/ai-context-engineering-for-qa/improve-context-from-sessions"><img src="https://agentmods.dev/badge/skills/vlad-ryzhkov/ai-context-engineering-for-qa/improve-context-from-sessions.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 94 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,970 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.
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.00094 $0.01970
Opus 5.5 $0.00038 $0.00788
Sonnet 5.5 $0.00019 $0.00394
Haiku 4.5 $0.00009 $0.00197

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

Security

Grade A, and why

improve-context-from-sessions 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 1mo 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.

.claude/skills/improve-context-from-sessions/SKILL.md · 135 lines

How it starts

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

/improve-context-from-sessions — Behavioral Retrospective

ROLE: turns corrections, tool-drift, and validated approaches from the live dialog into context patches. NEVER generates new skills (→ /init-skill).

Trigger: completion signal ("done", "shipped", "merge", "готово") → ASK "Run /improve-context-from-sessions to capture learnings?". Wait for consent. NO auto-fire.

SECOND trigger — BEFORE the artifact leaves the machine, not after: about to publish outward-facing work into a repo, tracker, or board you do not own. Mine the corpus for the gate that already covers it and run that gate FIRST. A retrospective that fires only on completion learns the lesson after the cost is paid; a draft killed at publication time has already burned the whole drafting session.

Invariants (BANNED to violate)

  • Surgical Edit ONLY. Wholesale rewrite = BANNED.
  • ONE pool, ONE apply. Collect EVERY accepted delta, then apply and commit them together. BANNED: apply a batch → keep mining → apply again. Each apply re-injects the whole corpus at the next context refresh, so N applies cost N × that. Re-run python3 scripts/context-check.py AFTER the pool, before the commit.
  • Terse rule style for rules/** + SKILL.md + JIT pointers ONLY. docs/** = human-prose OK. Style spec: docs/terse-rule-style.md.
  • NO new-skill generation (handoff → /init-skill).
  • Silent corpus edits = BANNED. ASK before any rules / CLAUDE.md / docs write.
  • ALREADY-COVERED test — run it per candidate, BEFORE the patch card. Grep CLAUDE.md + rules/** + the owning SKILL.md for the behaviour, not the wording. A rule that already exists AND is correct AND was simply ignored = NO patch: a fourth phrasing of the same rule buys nothing and costs every turn. Dedup (Step 3) catches a textual twin; this catches the live rule that fired and lost. Report it as "covered by <path>:<line>, model ignored it" — that is a hook or gate question, not a corpus edit.
  • SCOPE (warm vs cold): THIS skill writes POINT DELTAS into EXISTING rules/*.md / CLAUDE.md (a BANNED / REQUIRE / TRIGGER line). ALSO IN SCOPE: ONE small new docs/*.md (single focused pattern) + its 1-line JIT pointer — create directly, NO handoff. OUT of scope (→ HANDOFF patch-card, action Run /improve-project-context): MULTI-file change, evacuate block → docs/, repurpose a file, file grew or shrank significantly. This skill FINDS structure-at-scale; improve-project-context EDITS it.
  • CONTEXT-MAP sync: created / renamed / resized a context file → UPDATE context-map.md IMMEDIATELY in the same run. Cannot locate the map, or a multi-file resync is needed → append the recommendation "run /improve-project-context to resync". BANNED: leave the map drifted silently.
  • PLACEMENT: rule unique-to-project AND useful-to-colleagues → <repo>/.claude/ (git-shared). Global rule OR personal preference → ~/.claude/ (CLAUDE.md / rules / docs).
  • SHRINK SKILL.md over 300: TWO levers, in order — (1) EXTRACT blocks (examples, algorithms, tables, rationale) → references/ (JIT, 0 start-cost); (2) THEN compress remaining prose per docs/terse-rule-style.md. Extract beats compress.
  • COMPRESS prose-heavy CLAUDE.md / rules/*.md over budget → RECOMMEND a compress pass per docs/terse-rule-style.md. Other .md → softer recommend, only if token-pressured.

Read the full file on GitHub · 135 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 1mo ago First seen · 135 lines · 94 tokens per session scan A 07b0449daa5a

Subscribe to this mod's changes

improve-context-from-sessions is a skill published in the GitHub repository vlad-ryzhkov/ai-context-engineering-for-qa (6 stars, last pushed 1mo ago), licensed Unlicense. It adds 94 tokens to every session and 1,970 once invoked, about $0.0004 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-09-09.

Related

Other skills, from other repositories

effective-kotlin

Apply Effective Kotlin best practices (Marcin Moskała, 2nd Ed). Covers Safety (Items 1-10: mutability, scope, nulls, types, expectations, errors, resources, tests), Readability (Items 11-18: operators, receivers, properties, naming), Reusability (Items 19-25: DRY, generics, delegation, variance), Abstraction (Items…

booklib-ai/booklib · 212 tokens

kotlin-in-action

Apply Kotlin In Action practices (Elizarov, Isakova, Aigner, Jemerov, 2nd Ed). Covers Basics (Ch 1-3: functions, extensions, default args), Classes (Ch 4: sealed, data, delegation, companion objects), Lambdas (Ch 5-6: functional APIs, sequences, scope functions), Nullability (Ch 7-8: safe calls, Elvis, platform types…

booklib-ai/booklib · 250 tokens

openspec-new-change

Start a new OpenSpec change using the experimental artifact workflow. Use when the user wants to create a new feature, fix, or modification with a structured step-by-step approach. Also use when the user says "openspec new change" or "opsx new".

Fission-AI/OpenSpec · 58 tokens

eval-dataset-design

A guide to creating reliable test sets for AI agents. Each evaluation task includes the request, the simulated user's behaviour, a reset starting state, and a success check that can be independently verified.

bojieli/ai-agent-book · 138 tokens

memory-system

A guide to giving an AI agent persistent, user-specific memory across conversations. It covers what to remember, how to store it, how to update or compress it, and when to use memory instead of a shared knowledge base.

bojieli/ai-agent-book · 95 tokens

writing

A writing guide for turning verified facts and calculations into finished text for a specific audience. It follows the requested language, structure, and length.

bojieli/ai-agent-book · 27 tokens