Style DNA Ghostwriter
Style DNA Ghostwriter
코드베이스의 암묵적인 규칙을 배우세요. 어울리는 코드를 대신 작성합니다.
문제점
스타일 가이드와 린터는 팀이 직접 기록한 규칙만 강제합니다. 코드베이스의 실제 개성(오류 처리 방식, 컴포넌트 구조, 화살표 함수와 함수 선언 중 선호, Tailwind 유틸리티나 CSS 모듈 사용 방식, 독스트링의 실제 장황함 등)은 코드 자체 외에는 어디에도 존재하지 않습니다. AI가 생성한 코드는 이 모든 것을 무시하고 일반적이고 교과서적인 스타일을 기본값으로 삼는데, 이것이 바로 코드가 완전히 어울리지 않게 만드는 요소입니다.
Style DNA Ghostwriter는 새로운 시니어 엔지니어가 배우는 방식, 즉 아무도 업데이트하지 않은 위키 페이지가 아닌 코드를 읽어 규칙을 학습함으로써 이 문제를 해결합니다.
$ style-dna analyze ./my_web_app
Analyzed 42 files from './my_web_app' (0 Python, 42 Web).
Style profile saved to: style_profile.json
## Web Conventions
- Detected frameworks/tools: Next.js, React, Tailwind CSS, TypeScript.
### JavaScript / TypeScript
- Use single quotes for JS/TS strings.
- Omit semicolons at end of statements.
- Prefer arrow functions (`const fn = () => {}`).
- Prefer named exports.
- Use path aliases (`@/...`) for imports instead of deep relative paths.
- Prefer `interface` over `type` for object shapes in TypeScript.
### React / Next.js
- Next.js routing: App Router (`app/`).
- Define React components as arrow functions (`const Button = () => ...`).
- Component file naming: PascalCase.
- ~40% of components use 'use client' directive.
- State management: zustand.
### CSS / Styling
- Styling approach: Tailwind CSS utility classes.
- Uses CSS custom properties (`var(--token-name)`) for design tokens.
- Preferred color format: HSL.Related MCP server: Coding Standards MCP Server
모든 코딩 에이전트와 함께 작동
한 번의 명령어로 추출된 스타일을 팀이 사용하는 모든 에이전트에 연결합니다 — 플러그인이나 도구별 설정이 필요 없습니다:
style-dna init이 명령어는 규칙을 에이전트가 세션 시작 시 이미 읽는 컨벤션 파일에 직접 작성합니다:
파일 | 자동으로 읽는 에이전트 |
| Google Antigravity 및 Gemini Code Assist |
| Claude Code |
| Google Antigravity, Codex, OpenCode 및 AGENTS 표준을 따르는 도구 |
| Cursor |
| Windsurf |
| GitHub Copilot |
Model Context Protocol을 지원하는 에이전트(Claude Code, Cursor 등)의 경우,
style-dna init은 정적 파일 대신 실시간으로 규칙을 가져올 수 있도록
복사하여 붙여넣기만 하면 되는 MCP 설정도 출력합니다:
{
"mcpServers": {
"style-dna": {
"command": "style-dna",
"args": ["mcp"]
}
}
}노출된 MCP 도구: analyze_repo, get_style_rules, refresh_style_profile.
추출하는 내용
스택 / 카테고리 | 추출된 신호 |
Python | 함수/변수 케이스 스타일, private 접두사 비율 ( |
JavaScript / TypeScript | 세미콜론 ( |
React / Next.js | App Router ( |
CSS 및 스타일링 | Tailwind CSS vs CSS Modules ( |
HTML | 들여쓰기 스타일 (2 스페이스 / 4 스페이스 / 탭), 속성 따옴표 스타일 ( |
작동 방식
**
analyze**는 코드베이스를 탐색하고 외부 바이너리나 컴파일러 의존성 없이 모든 소스 파일을 분석합니다. 플러그 가능한 특수 추출기 모음이 구문 트리와 소스 토큰을 분석하여StyleProfile(구조화되고 버전 관리 가능한 지문으로style_profile.json에 저장됨)을 생성합니다.**
init**은analyze를 실행한 후, 해당 프로필을 깔끔한 업데이트 마커(<!-- style-dna:start -->...<!-- style-dna:end -->)로 둘러싸서 표준 에이전트 컨벤션 파일(CLAUDE.md,AGENTS.md,.cursorrules등)에 주입합니다.generate(선택 사항)는 프로필을 시스템 프롬프트로 변환하고 Claude API를 직접 호출하여, 터미널에서 대신 작성된 코드를 원하는 팀을 위한 기능입니다.
style-dna-ghostwriter/
├── style_dna/
│ ├── analyzer.py # multi-language codebase scanner
│ ├── profile.py # StyleProfile data model + save/load + multi-stack rules
│ ├── generator.py # profile -> system prompt -> Claude API call
│ ├── mcp_server.py # MCP server exposing tools for agents
│ ├── conventions.py # upserts rules into CLAUDE.md/AGENTS.md/.cursorrules/etc.
│ ├── cli.py # `style-dna` CLI (init, analyze, show, generate, mcp)
│ └── extractors/ # Python, JS/TS, React/Next.js, CSS/Tailwind, HTML
├── examples/
│ ├── sample_repo/ # Python test fixture
│ └── sample_web_repo/ # Next.js 14 + React TSX + Tailwind test fixture
└── tests/ # Complete test suite설치
# Core only (zero external dependencies):
pip install -e .
# With MCP server support:
pip install -e ".[mcp]"
# With direct Claude code generation support:
pip install -e ".[generate]"
# All features:
pip install -e ".[all]"사용법
# One-shot setup for any repo (Python, React, Next.js, etc.):
style-dna init
# Inspect codebase style rules:
style-dna analyze ./my_repo --out style_profile.json
style-dna show style_profile.json
style-dna show style_profile.json --format json
# Direct generation (requires ANTHROPIC_API_KEY):
export ANTHROPIC_API_KEY=sk-...
style-dna generate style_profile.json \
"Write a React component that displays a product card with add to cart button" \
--out ProductCard.tsxPython 라이브러리로 사용:
from style_dna import analyze_codebase
from style_dna.generator import generate_code
profile = analyze_codebase("./my_repo")
code = generate_code(profile, "Add a custom hook to manage user favorites")테스트
pip install -e ".[dev]"
python -m pytest tests/ -v라이선스
MIT 라이선스에 따라 배포됩니다.
Kaifazad 제작 — kaifazad.in
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityDmaintenanceCode linting and style checking tools for AI agents, exposed as an MCP server. Supports style checks, naming conventions, complexity analysis, dead code detection, and import analysis.55MIT
- Flicense-qualityDmaintenanceAutomatically enforces team coding standards in AI-assisted development by providing an MCP server that AI assistants can query for language-specific standards, style guides, and best practices.
- Alicense-qualityDmaintenanceProvides a CLI and MCP server for scanning repositories to generate evidence-backed, project-specific instruction files for AI coding assistants, ensuring AI behavior aligns with existing codebase conventions.115Apache 2.0
- Alicense-qualityBmaintenanceScans your source code using AST analysis to detect coding conventions, error handling, API patterns, and more, then generates a CONVENTIONS.md file to help AI agents follow your project's style.MIT
Related MCP Connectors
Lints + auto-fixes how AI coding agents discover any new product. 24 rules, 6 tools, score 0-100.
Repo intel for AI coding agents: overview, PRs, contributors, hot files, CI, deps. Remote MCP.
Hosted MCP server for structured code review passes on human- and AI-written code. Free tier.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Kaifazad/Style-DNA-Ghostwriter'
If you have feedback or need assistance with the MCP directory API, please join our Discord server