codehealth-mcp
하는 일
이 도구는 코드의 구조적 ‘건강 상태’, 즉 내부가 어떻게 정리되어 있는지를 분석합니다. 코드가 유지보수하기 쉬운지 아니면 개선이 필요한지 이해할 수 있도록 1에서 10까지의 점수를 줍니다.
사용하는 경우
- ✓변경하기 전에 코드 품질을 검토할 때.
- ✓파일을 리팩터링(구조 개선)하기 전에.
- ✓AI가 한 변경으로 코드가 나빠졌는지 확인할 때.
스킬 링크
https://github.com/affaan-m/ECC/blob/main/skills/codehealth-mcp/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“편집을 시작하기 전에 이 파일의 코드 건강 상태를 확인해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
도구는 코드를 로컬에서 분석하는 서버에 연결합니다. 코드의 구조를 검사하고 점수를 주어, 문제가 커지기 전에 구성상의 문제를 찾도록 돕습니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Code Health MCP (CodeScene)
Structural maintainability feedback for AI-assisted coding. Complements style/lint skills (coding-standards, plankton-code-quality) with design-level health scores and regression gates.
Upstream: codescene-oss/codescene-mcp-server
Package: @codescene/codehealth-mcp (stdio via npx)
Security and boundaries
Opt-in (ECC): The codescene block in mcp-configs/mcp-servers.json is a template only. ECC plugin installs do not auto-enable bundled MCP servers. Copy the entry into your config only if you want it. You can exclude it during ECC install/sync with ECC_DISABLED_MCPS=codescene,....
Credentials: No bundled token. Set CS_ACCESS_TOKEN yourself (see getting-a-personal-access-token.md in the upstream repo). Never commit tokens to the repo.
What the tools read: When invoked, tools analyze files and git state in the local repository you point them at (paths you pass, plus branch context for analyze_change_set). They do not run by themselves. For standalone mode, follow upstream privacy docs: codescene-mcp-server README and CodeScene policies. Do not use this skill for secrets, credentials, or paths you do not want analyzed.
If the MCP is unavailable (offline, bad token, server crash): Do not invent Code Health scores. Tell the user the check was skipped. Continue only with explicit user approval. Prefer lint/tests/verification-loop for gating when MCP is down. Re-enable checks once the server connects.
When to Use
- User asks to review code quality, refactor a file, or check if AI changes degraded maintainability
- Before editing a hotspot, legacy module, or unfamiliar file
- Before commit or pull request when you need a maintainability safeguard
- After a large agent-written diff — verify Code Health did not regress
- Pair with
verification-loop,tdd-workflow, or/quality-gateas a structural check (not a replacement for tests/lint)
When to Activate
Same triggers as When to Use above — this heading is what ECC uses for skill auto-activation.
How It Works
1. Connect the MCP server
Copy the codescene entry from mcp-configs/mcp-servers.json into your harness MCP config.
Claude Code (~/.claude.json → mcpServers):
"codescene": {
"command": "npx",
"args": ["-y", "@codescene/codehealth-mcp"],
"env": {
"CS_ACCESS_TOKEN": "YOUR_CS_ACCESS_TOKEN_HERE"
}
}
Project-scoped: merge the same block into .mcp.json at the repo root.
Token setup is documented in the upstream repo (link above). Standalone mode does not require a paid CodeScene platform account for the four tools listed below. Restart the session and confirm the codescene server is connected before relying on scores.
2. Call standalone tools only
| Tool | When to use |
|---|---|
code_health_review |
Full structural analysis before modifying a file |
code_health_score |
Quick numeric score after each change (delta check) |
pre_commit_code_health_safeguard |
Block commits that introduce Code Health regressions |
analyze_change_set |
Branch-level check before opening a PR |
Do not call platform-only tools (e.g. repository-wide technical debt hotspot lists). Do not reference delta_analysis — not available on standalone.
3. Interpret scores (1–10)
| Range | Meaning | Agent behavior |
|---|---|---|
| 9.0–10.0 | Green — healthy | Safer to extend; still prefer vertical slices |
| 4.0–8.9 | Yellow — debt | Tread carefully; no drive-by refactors |
| 1.0–3.9 | Red — severe debt | Narrow scope only |
4. Run the feedback loop
Before touching a file
- Run
code_health_reviewon the target path. - Record baseline score and listed code smells.
- Plan the smallest change that addresses the task.
Scope by score: below 5 — minimal diff only; 5–7 — no broad refactors; above 7 — safer to refactor, still verify after each edit.
After each change
- Run
code_health_scoreon the same file. - Compare to the baseline from
code_health_review.
…
자주 묻는 질문
도구는 어떻게 설정하나요?
액세스 토큰을 설정하고 서버 위치를 지정해야 합니다. 자세한 안내는 도구의 문서에 있습니다.
점수는 무엇을 뜻하나요?
9에서 10점은 아주 좋음(초록), 4에서 8.9점은 주의(노랑), 1에서 3.9점은 심각한 문제(빨강)를 나타냅니다.
서버를 사용할 수 없으면 어떻게 되나요?
도구는 검사가 건너뛰어졌다고 알리고, 검사 없이 진행할지 사용자의 승인을 요청합니다. 테스트나 린트 같은 다른 점검을 사용하는 것이 좋습니다.
상세 정보
작성자의 원본 설명
Real-time structural Code Health via CodeScene MCP — review before edits, verify score deltas after changes, gate commits and PRs. Use when reviewing code quality, refactoring, checking if AI changes degraded a file, or before commit/PR.
repo: affaan-m/ECC
인기도
- GitHub 스타
- 280k
- 순위
- #278
- 라이선스
- MIT
- 업데이트
- 2026. 10. 15.
댓글
- …
이 저장소의 다른 스킬
accessibility
280k에이전트가 모든 사람이 쓸 수 있는 인터페이스를 만들도록 돕습니다. 시각 장애나 운동 장애가 있는 사람도 쓸 수 있게 합니다.
agent-architecture-audit
280k에이전트가 모든 것이 올바르게 작동하는지 점검하도록 돕습니다. AI 시스템의 문제를 찾아 고쳐서 기대대로 작동하게 합니다.
agent-eval
280k에이전트가 서로 다른 AI 코딩 도구를 비교하도록 돕습니다. 특정 작업에서 어느 도구가 더 빠르고, 저렴하고, 믿을 만한지 측정합니다.
agent-harness-construction
280k에이전트가 작업을 더 잘 이해하도록 돕습니다. 에이전트가 쓰는 도구와 지시문을 최적화해 성공 가능성을 높입니다.