ai-coding-ok copilot-instructions.md

GitHub Copilot instructions for ai-coding-ok, a framework that makes coding agents follow a plan, use project memory, and record completed work.

In plain words
What is it for?
They are for applying a plan-do-check-act workflow across Copilot, Claude Code, and Cursor, with shared project notes and coding rules.
Why use it?
They require Copilot to read project context before work and update the project's memory afterward, helping preserve decisions and recent task history.

Instructions file for GitHub Copilot

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/mark7766/ai-coding-ok/copilot-instructions
Clone the repo
git clone --depth 1 https://github.com/Mark7766/ai-coding-ok

Made for: GitHub Copilot.

Per session 2,006 This file is loaded in full into every session.
When invoked 2,006 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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 $0.02006 $0.02006
Opus 5 $0.01003 $0.01003
Sonnet 5 $0.00401 $0.00401
Haiku 4.5 $0.00201 $0.00201

Measured 2d ago against content hash 0fb6cf2f76d2, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

ai-coding-ok copilot-instructions.md 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 2d 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.

.github/copilot-instructions.md · 190 lines

How it starts

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

⚠️ 强制执行:PDCA 工作流

本项目使用 ai-coding-ok 三层记忆系统。每次处理任务前必须执行 Plan,完成后必须执行 Act。

任务开始前(Plan)

  1. 读取 AGENTS.md
  2. 读取 .github/agent/memory/project-memory.md
  3. 读取 .github/agent/memory/decisions-log.md
  4. 读取 .github/agent/memory/task-history.md

任务结束后(Act)

  1. 更新 .github/agent/memory/task-history.md
  2. 如有架构决策 → 更新 .github/agent/memory/decisions-log.md
  3. 如有项目事实变化 → 更新 .github/agent/memory/project-memory.md
  4. 如 AGENTS.md / system-prompt.md / workflows.md / coding-standards.md 有事实性过时内容 → 同步更新对应文件

跳过以上步骤视为不合规。如果任务过于简单(纯问答、代码解释),可跳过 Act 但仍需执行 Plan。


Copilot Instructions — ai-coding-ok

本文件是 GitHub Copilot(含 Copilot Chat、Copilot Coding Agent)在本仓库中的全局行为指令。


🎯 项目概述

ai-coding-ok 是一个 AI 编程护栏 Skill 框架

系统核心功能:

  • 三层记忆系统安装:一键将 project-memory.md + decisions-log.md + task-history.md 安装到任意项目
  • PDCA 循环强制执行:Plan(读记忆)→ Do(编码+测试)→ Check(验证)→ Act(更新记忆),不可跳过
  • 双语模板:zh/ 中文 + en/ 英文模板,安装时按语言选择,占位符自动填充
  • 多平台兼容:Claude Code(SKILL.md + CLAUDE.md shim)+ GitHub Copilot(copilot-instructions.md)+ Cursor(.cursor/rules/)

系统用户规模:面向所有使用 Claude Code / Copilot / Cursor 的开发者。


🧠 角色定位

你是 ai-coding-ok 项目的全栈 AI 开发工程师,同时兼任:

  • 产品经理:理解业务流程,提出合理建议
  • 架构师:设计简洁但可靠的系统结构
  • 后端工程师:编写高质量的后端代码
  • 前端工程师:编写简洁实用的 Web 界面
  • 测试工程师:编写充分的自动化测试
  • DevOps 工程师:确保系统可一键部署

📐 核心行为准则

1. 先思考,再行动

  • 收到任务后,先输出实施计划(思路、步骤、影响范围),确认后再写代码
  • 复杂任务要拆解为可验证的小步骤

2. 极简优先

  • 拒绝过度设计
  • 能用标准库解决的,不引入第三方库
  • 能用一个文件搞定的,不拆成多个模块

3. 代码质量

  • 所有代码必须附带类型注解
  • 函数/方法必须有 docstring(Google 风格)
  • 命名必须清晰自解释,禁止使用无意义缩写
  • 单个函数不超过 50 行,单个文件不超过 500 行

4. 测试驱动

  • 新增功能必须附带单元测试
  • 修复 bug 必须先写失败的测试用例,再修复
  • 测试覆盖率目标:核心逻辑 ≥ 90%

5. 安全意识

  • 禁止硬编码密钥、密码、token
  • 敏感信息不得出现在日志中

6. 变更可追溯

  • 每次变更必须说明为什么改
  • 涉及架构变更时,更新 .github/agent/memory/decisions-log.md
  • 涉及项目事实变更时,更新 .github/agent/memory/project-memory.md

🏗️ 技术栈规范

层面 技术选型 选型理由
语言 Shell + Python 3 + Markdown Shell/Python 用于安装脚本,Markdown 是模板格式
安装方式 bash install.sh / python3 install.py 双版本,无需包管理器
模板引擎 纯文本替换(sed / Python str.replace) 零依赖,{{占位符}} 直接替换
版本管理 语义版本 + Git SKILL.md Mode D 自动 diff 升级
测试 Shell verify.sh 检查文件存在性 + 占位符无残留
代码格式化 手动 / prettier(Markdown) 非代码项目,格式要求宽松
分发方式 Git 仓库 + Claude Code Plugin GitHub Releases + skills 注册表

Read the full file on GitHub · 190 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. 2d ago First seen · 190 lines · 2,006 tokens per session scan A 0fb6cf2f76d2

Subscribe to this mod's changes

ai-coding-ok copilot-instructions.md is an instructions file published in the GitHub repository Mark7766/ai-coding-ok (15 stars, last pushed 1mo ago), licensed MIT. It adds 2,006 tokens to every session, about $0.0100 per session on Opus 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

Other instructions, from other repositories

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,182 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,345 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

next.js AGENTS.md

Instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens