From ai-coding-ok
Three-tier project memory system (project-memory, decisions-log, task-history) with PDCA guardrails. Installs memory templates, loads context before coding, and updates memory after each task to prevent regressions across iterations.
How this skill is triggered — by the user, by Claude, or both
Slash command
/ai-coding-ok:ai-coding-okThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
A three-tier memory system + AI coding guardrails. The PDCA closed loop (Plan → Do → Check → Act) keeps project context accurate across sessions and iterations. Works with Claude Code, GitHub Copilot, OpenCode, and Cursor.
A three-tier memory system + AI coding guardrails. The PDCA closed loop (Plan → Do → Check → Act) keeps project context accurate across sessions and iterations. Works with Claude Code, GitHub Copilot, OpenCode, and Cursor.
When activated in a project, the skill copies a curated set of files into the target project:
<project-root>/
├── AGENTS.md # Architecture cheatsheet (AI reads first)
├── CLAUDE.md # Claude Code auto-load shim → @AGENTS.md
└── .github/
├── copilot-instructions.md # Global behavior rules (Copilot auto-loads)
├── project-metadata.yml # Machine-readable project facts
├── PULL_REQUEST_TEMPLATE.md
├── ISSUE_TEMPLATE/…
├── workflows/ # CI + memory update reminder
└── agent/
├── system-prompt.md # Agent persona + PDCA workflow
├── coding-standards.md
├── workflows.md # Scenario playbooks
├── prompt-templates.md
└── memory/
├── project-memory.md # 🧠 Long-term memory (facts, constraints)
├── decisions-log.md # 📝 Mid-term memory (ADRs)
└── task-history.md # 📜 Short-term memory (recent tasks)
Determine which mode applies, then follow that mode's instructions.
Triggers:
.github/agent/memory/Action: → Follow the Installation Playbook below (Steps 1–8)
Triggers:
.github/agent/memory/Action (~30 seconds, before any actual work):
AGENTS.md — architecture cheatsheet.github/agent/memory/project-memory.md — stable facts and constraints.github/agent/memory/decisions-log.md — historical technical decisions.github/agent/memory/task-history.md — recent task context⚠️ Mode B is NOT a replacement for the user's task. It is context loading that happens before the task. If another skill is also triggered (e.g.
writing-plansfrom superpowers), execute Mode B first, then enter that skill.
Triggers:
Action (must not skip):
.github/agent/memory/task-history.md — record this task's summary.github/agent/memory/decisions-log.md.github/agent/memory/project-memory.md⚠️ If context limits prevent direct file edits, output the required updates as text and tell the user to apply them manually.
Triggers:
Action: → Follow the Upgrade Playbook below
Before Mode A or any user-facing output, detect the user's language:
templates/zh/templates/en/When in doubt, ask the user once: "Should I install the English or Chinese template? (en/zh)"
⚠️ These steps run only in Mode A (first install). Mode B and Mode C do NOT use this flow.
Follow the steps in order. Do not skip Step 4 (customization) — unfilled {{placeholders}} defeat the whole purpose.
The templates live at <plugin-root>/templates/{en|zh}/, where <plugin-root> is the parent directory of the directory containing this SKILL.md. Resolve the absolute path before copying.
If invoked via claude --plugin-dir, use:
<plugin-dir>/templates/en/ # English projects
<plugin-dir>/templates/zh/ # Chinese projects
If invoked from a legacy git-clone install at ~/.claude/skills/ai-coding-ok/, use:
~/.claude/skills/ai-coding-ok/templates/{en|zh}/
Default target is the current working directory. Confirm with the user only if:
$HOME, /tmp).Before copying anything, check whether any of these paths already exist in the target:
AGENTS.mdCLAUDE.md.github/copilot-instructions.md.github/agent/ (directory)If any exist, STOP and report to the user. Offer three choices:
Never silently overwrite existing files.
Copy the entire contents of the chosen language template directory into the project root. On POSIX:
cp -rn <plugin-root>/templates/<lang>/. <project-root>/
-n = no-clobber, keeping the user's existing edits safe. On Windows/Node, do an equivalent merge-copy.
Verify the target files/dirs are present. Fail loudly if any are missing.
Do NOT ask the user to fill in placeholders manually. Instead, ask a single plain-language question:
"In one sentence, what are you building? Example: 'A personal expense tracker that records what I spend each day.'"
(Chinese: "一句话告诉我你想做一个什么东西?")
Based on the user's sentence, infer:
{{project-name}} / {{项目名称}}){{project-type}}, {{project-type-brief}})Then walk every copied file and replace every {{...}} placeholder with the inferred value. Files to process:
AGENTS.mdCLAUDE.md (Claude Code shim — typically just @AGENTS.md, no placeholder, but verify).github/copilot-instructions.md.github/project-metadata.yml.github/ISSUE_TEMPLATE/config.yml.github/workflows/ci.yml.github/workflows/memory-check.yml.github/agent/system-prompt.md.github/agent/coding-standards.md.github/agent/workflows.md.github/agent/prompt-templates.md.github/agent/memory/project-memory.md.github/agent/memory/decisions-log.md.github/agent/memory/task-history.mdFor {{YYYY-MM-DD}} placeholders use today's date.
When uncertain about a choice (e.g. "SQLite vs Postgres?"), pick the simpler one and note it in decisions-log.md as ADR-001. The user can override later.
After replacement, populate task-history.md with a real first entry:
### [TASK-001] Install ai-coding-ok and initialize project
- **Date**: <today>
- **Type**: chore
- **Summary**: Installed three-tier memory system and coding standards via the ai-coding-ok skill. Tech stack and constraints were inferred from the user's one-sentence description (<user's exact words>) and applied automatically.
- **Files changed**: AGENTS.md, .github/**/*
- **Notes**: First run — keep `project-memory.md` and `decisions-log.md` in sync as architecture evolves.
Output:
AGENTS.md to review. From now on, I will read the memory files before every task and update task-history.md after every task."Once installed, ALL subsequent sessions (this one included) must follow the PDCA loop defined in .github/agent/system-prompt.md:
AGENTS.md + .github/agent/memory/*.md before touching code.task-history.md (always), decisions-log.md (when architecture changed), project-memory.md (when facts changed).This is the mechanism that prevents "AI fixed bug X and deleted feature Y".
When superpowers and ai-coding-ok are both installed, ai-coding-ok is responsible for ensuring PDCA runs end to end, without depending on superpowers to cooperate.
Path A (with superpowers):
using-superpowers → brainstorming → writing-plans → executing-plans
↑
brainstorming Step 1 reads AGENTS.md (Explore project context)
← The PDCA mandate at the top of AGENTS.md is the hook point
Path B (no superpowers, pure ai-coding-ok):
user request → AI scans skill triggers → invokes ai-coding-ok SKILL.md
← SKILL.md Mode B / Mode C is the hook point
Before invoking brainstorming / writing-plans / executing-plans, run Mode B first (read memory files). This carries constraints and historical context into the downstream flow.
Whatever writing-plans produces, append after the last task of the plan:
### Task N+1: Update project memory (PDCA Act — ⚠️ DO NOT SKIP)
**Files:**
- Modify: `.github/agent/memory/task-history.md`
- Modify: `.github/agent/memory/decisions-log.md` (if architecture changed)
- Modify: `.github/agent/memory/project-memory.md` (if facts changed)
- [ ] Update task-history.md with a summary of this work
- [ ] If this work introduced architecture/tech decisions → record a new ADR in decisions-log.md
- [ ] If project facts changed (new modules, new dependencies, status changes) → update project-memory.md
- [ ] Confirm all memory files are updated
Run Mode C (Act phase) and update memory files. This step is enforced by ai-coding-ok itself, regardless of which superpowers version is installed.
templates/{en,zh}/AGENTS.md already embeds the PDCA mandate at the top. When brainstorming Step 1 (Explore project context) reads AGENTS.md, the AI hits the PDCA requirement directly and executes it. This guarantees PDCA runs even if ai-coding-ok SKILL.md is not triggered — AGENTS.md takes over.
⚠️ These steps run only in Mode D (upgrade).
Read the first line of these files in the project and extract the version marker:
AGENTS.md.github/copilot-instructions.md.github/agent/system-prompt.md.github/agent/coding-standards.md.github/agent/workflows.md.github/agent/prompt-templates.mdVersion marker formats: <!-- ai-coding-ok: vX.Y --> or # ai-coding-ok: vX.Y.
If any file lacks a version marker, treat it as v1.0 (initial release, no markers).
Report the detected version to the user:
"Detected ai-coding-ok version in this project: vX.Y. Latest template version: vX.Y."
Read all template files in <plugin-root>/templates/<lang>/ — these contain {{placeholders}} and represent the latest framework structure.
Diff the latest template structure against the installed files in the project, file by file:
Strategy:
## / ###)Output a change summary, e.g. (v2.1.0 → v2.2.0):
Upgrade change list:
✅ templates/CLAUDE.md — new (Claude Code auto-load shim, @AGENTS.md import)
✅ all files — version marker bump v2.1.0 → v2.2.0
📌 Historical upgrade paths (look up your current installed version):
Path Main changes v1.0 → v2.0 AGENTS.md / copilot-instructions.md gain mandatory PDCA section; workflows.md Step 5 gets "⚠️ DO NOT SKIP" annotation; all files get version markers v2.0 → v2.1.0 Add templates/.cursor/rules/ai-coding-ok.mdc(Cursor support); version markers bumped to v2.1.0v2.1.0 → v2.2.0 Add templates/CLAUDE.md(Claude Code auto-load shim → @AGENTS.md); SKILL.md description rewritten (framework only, no project-file impact); version markers bumped to v2.2.0v2.2.0 → v3.0.0 Plugin packaging ( .claude-plugin/plugin.json,skills/ai-coding-ok/); bilingual templates (templates/en/,templates/zh/); README split (English root, Chinese inREADME.zh.md); version markers bumped to v3.0.0Apply versions in order across multi-step jumps (e.g. v1.0 → v2.0 → v2.1.0 → v2.2.0 → v3.0.0).
Show the change list to the user and ask:
"These are the planned upgrade changes. Continue? (Y/n)"
⚠️ Never auto-apply — upgrade modifies existing files and must be user-confirmed.
Once confirmed, apply changes file by file:
5a. Add sections:
{{placeholders}} in the new content with values already filled in the project
5b. Remove sections:
5c. Modify sections:
{{placeholders}} with the project's actual values5d. Bump version markers:
{{placeholders}} leaked into project filesAppend to .github/agent/memory/task-history.md:
### [TASK-00N] Upgrade ai-coding-ok to vX.Y
- **Date**: <today>
- **Type**: chore
- **Summary**: Auto-upgraded ai-coding-ok framework files via Mode D. Sections added/modified: <change summary>
- **Files changed**: <actual change list>
- **Notes**: <merge details to review, if any>
## ai-coding-ok upgrade complete
| Item | Old | New |
|------|-----|-----|
| ai-coding-ok | vX.Y | vX.Y |
### Files changed
- ✅ AGENTS.md — <summary>
- ✅ .github/copilot-instructions.md — <summary>
- ...
### Project customizations preserved
- Project name, tech stack, architecture diagram unchanged
- Memory files (project-memory.md, etc.) unchanged
### Manual review needed
- <if any>
These tools don't load SKILL.md. Their users get the same value via:
install.sh (or install.py) once at the plugin root to copy templates/<lang>/ into their project..github/copilot-instructions.md for Copilot; .cursor/rules/ai-coding-ok.mdc for Cursor; AGENTS.md for OpenCode), which all reference the memory system and PDCA workflow.scripts/customize-prompt.md into the tool's chat to trigger replacement.templates/en/, templates/zh/ — source of truth for installed files (bilingual since v3.0.0).scripts/customize-prompt.md — customization prompt for non-Claude-Code tools.scripts/upgrade-prompt.md — manual upgrade prompt for Copilot / Cursor.scripts/verify.sh — post-install sanity check.docs/claude-code-quickstart.md — Claude Code users.docs/copilot-quickstart.md — Copilot users.docs/superpowers-combo.md — combo recipes with superpowers.docs/faq.md — common questions.2plugins reuse this skill
First indexed Jul 7, 2026
npx claudepluginhub mark7766/ai-coding-okMandatory workflow router invoked before any code edits, debugging, planning, or review. Runs entry sequence including token efficiency and routes to the correct skill for the task.
Crafts effective prompts, CLAUDE.md instructions, rules, agent system prompts, and skill bodies for reliable Claude Code behavior.
Orchestrates AI coding workflows with self-correction loops, pre-flight discipline rules, and cross-agent support for Claude Code and other agents.