# Code Simplifier

> 提交前精炼代码（行为不变）。用户要 commit、push、提 PR，或说简化、精炼、清理一下再提交时，按 workflow 在 code-review-expert 前/后串行使用。不要用于日常小改；不要替代审查。

- **Type:** Skill
- **Install:** `agentstack add skill-hyx-lhj-mini-harness-code-simplifier`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [HYX-LHJ](https://agentstack.voostack.com/s/hyx-lhj)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [HYX-LHJ](https://github.com/HYX-LHJ)
- **Source:** https://github.com/HYX-LHJ/mini-harness/tree/main/mini-harness/skills/code-simplifier

## Install

```sh
agentstack add skill-hyx-lhj-mini-harness-code-simplifier
```

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

## About

# ✨ 代码精炼

**改怎么做，不改做什么。** 所有行为、输出、边界必须与精炼前一致。

---

## 原则

1. **功能不变** — 精炼是重构，不是改需求
2. **跟项目走** — `profile/PROJECT.md`、相关 `DECISIONS`、`commands.gate`
3. **清晰优先** — 减嵌套、去冗余、好命名；避免嵌套三元；**可读 > 行数少**
4. **不过度** — 不删有益抽象，不追求「聪明」一行流
5. **限定范围** — 默认仅本会话改过的代码

---

## 流程

1. 识别近期修改的代码段
2. 找可简化点（重复、命名、结构）
3. 应用项目工具链与规范
4. 跑门禁确认行为不变
5. 记录到 `harness/code_simplifier/YYYY-MM-DD_.md`（重要变更才写）

---

## 产出

精炼记录（可选）含：改了哪些文件 · 动机 · 确认测试/门禁仍过。

**仅在用户明确要求提交/推送时运行。** 精炼后须再走 `code-review-expert`（见 [workflow](../using-harness/references/workflow.md)）。

## Source & license

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

- **Author:** [HYX-LHJ](https://github.com/HYX-LHJ)
- **Source:** [HYX-LHJ/mini-harness](https://github.com/HYX-LHJ/mini-harness)
- **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-hyx-lhj-mini-harness-code-simplifier
- Seller: https://agentstack.voostack.com/s/hyx-lhj
- 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%.
