# Source Coding Discipline

> Use when a task involves reading, editing, reviewing, testing, debugging, refactoring, or otherwise working with source code files. Source paths include **/*.{py,ts,tsx,js,jsx,mjs,go,rs,java,kt,swift,rb,c,cc,cpp,h,hpp,sh,bash,zsh,sql,vue,svelte}. Do not use for docs-only, planning-only, or non-code file tasks unless the task also touches source code.

- **Type:** Skill
- **Install:** `agentstack add skill-martin1847-evolab-source-coding-discipline`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [martin1847](https://agentstack.voostack.com/s/martin1847)
- **Installs:** 0
- **Category:** [Databases](https://agentstack.voostack.com/c/databases)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [martin1847](https://github.com/martin1847)
- **Source:** https://github.com/martin1847/evolab/tree/main/skills/source-coding-discipline

## Install

```sh
agentstack add skill-martin1847-evolab-source-coding-discipline
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# 写码纪律（碰源码文件时加载）

> 镜像注：四段纪律正文与本仓库 `templates/rules/coding.md` 同源（路径相对 evolab 仓库根；本 skill
> 单独 cp 安装后该文件不随行，同步义务只落在仓库维护侧）——
> rules 形态给支持 `paths:` 条件加载的 agent（Claude Code / omp），skill 形态给不支持的（codex 等）。
> **改任一边必须同步另一边**（硬门：`test/mirror-sync.test.sh` 四段逐字 diff，漂移即红）；
> 同一 agent 勿两种形态同装（双重注入）。

**先思考再编码**：显式说出假设，不确定就问；多种解读全部列出、不静默选边；有更简单的路径就说出来；困惑就停下来问。

**简单优先——解决问题的最少代码，零投机**：不做超出要求的功能；单次使用的代码不抽象；没要求的"灵活性/可配置性"不引入；不可能发生的场景不写错误处理。写了 200 行能压到 50 行的，重写。自问："资深工程师会觉得这过度复杂吗？"（零投机指交付物范围——风险枚举 / 预判 / 评审轴该大胆发散。）

**外科手术式改动**：每一行改动都能直接追溯到用户请求。不"改进"邻近代码/注释/格式，顺应已有风格。自己的改动产生的孤儿（未用 import/变量/函数）要清；既有死代码指出来、不删。

**目标驱动执行**：把任务转成可验证目标——"加校验"→"为非法输入写测试并让它过"；"修 bug"→"先写能复现的测试再修到过"；"重构"→"改前改后测试都过"。多步任务先列简短计划：`步骤 → 验证`。强验证标准让你独立循环，弱标准（"能跑"）需要不停澄清。

**验证诚实性**：禁止声称测试通过、命令成功、文件存在，除非实际跑过 / 读过。未跑就说"未运行验证"。完成时简短说明：改了什么 / 跑了什么验证 / 什么没验证 / 剩余假设或风险。

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [martin1847](https://github.com/martin1847)
- **Source:** [martin1847/evolab](https://github.com/martin1847/evolab)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-martin1847-evolab-source-coding-discipline
- Seller: https://agentstack.voostack.com/s/martin1847
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
