본문으로 건너뛰기
Skillpedia
일반 코딩280k · #278

codehealth-mcp

하는 일

이 도구는 코드의 구조적 ‘건강 상태’, 즉 내부가 어떻게 정리되어 있는지를 분석합니다. 코드가 유지보수하기 쉬운지 아니면 개선이 필요한지 이해할 수 있도록 1에서 10까지의 점수를 줍니다.

사용하는 경우

  • ✓변경하기 전에 코드 품질을 검토할 때.
  • ✓파일을 리팩터링(구조 개선)하기 전에.
  • ✓AI가 한 변경으로 코드가 나빠졌는지 확인할 때.

스킬 링크

https://github.com/affaan-m/ECC/blob/main/skills/codehealth-mcp/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/affaan-m/ECC/blob/main/skills/codehealth-mcp/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

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-gate as 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

  1. Run code_health_review on the target path.
  2. Record baseline score and listed code smells.
  3. 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

  1. Run code_health_score on the same file.
  2. 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.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬