Style DNA Ghostwriter
Style DNA Ghostwriter
Lernen Sie die ungeschriebenen Konventionen einer Codebasis. Schreiben Sie Code, der dazugehört.
Das Problem
Styleguides und Linter erzwingen nur Regeln, die ein Team die Mühe hatte aufzuschreiben. Der Rest der eigentlichen Persönlichkeit einer Codebasis — wie Fehler behandelt werden, wie Komponenten strukturiert werden, ob Pfeilfunktionen oder Deklarationen bevorzugt werden, wie Tailwind-Utilities oder CSS-Module verwendet werden, wie ausführlich Docstrings tatsächlich sind — lebt nirgendwo außer im Code selbst. KI-generierter Code ignoriert all das und verfällt in generischen, lehrbuchhaften Stil, was genau der Grund ist, warum er als nicht-dazugehörig auffällt.
Style DNA Ghostwriter behebt dies, indem es Konventionen so lernt, wie es ein neuer Senior-Entwickler tun würde: durch das Lesen des Codes, nicht der Wikiseite, die niemand aktualisiert hat.
$ 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
Funktioniert mit jedem Coding-Agenten
Ein Befehl verdrahtet den extrahierten Stil in jeden Agenten, den Ihr Team verwendet — kein Plugin, keine tool-spezifische Konfiguration:
style-dna initDies schreibt die Regeln direkt in die Konventionsdateien, die Agenten bereits bei Sitzungsbeginn lesen:
Datei | Wird automatisch gelesen von |
| Google Antigravity & Gemini Code Assist |
| Claude Code |
| Google Antigravity, Codex, OpenCode und Tools, die dem AGENTS-Standard folgen |
| Cursor |
| Windsurf |
| GitHub Copilot |
Für Agenten, die das Model Context Protocol sprechen (Claude Code, Cursor und
andere), gibt style-dna init auch eine bereit-zum-Einfügen MCP-Konfiguration aus, sodass der
Agent Regeln live statt aus einer statischen Datei abrufen kann:
{
"mcpServers": {
"style-dna": {
"command": "style-dna",
"args": ["mcp"]
}
}
}Verfügbare MCP-Tools: analyze_repo, get_style_rules, refresh_style_profile.
Was extrahiert wird
Stack / Kategorie | Extrahierte Signale |
Python | Funktions-/Variablen-Groß-/Kleinschreibung, private Präfixrate ( |
JavaScript / TypeScript | Semikolons ( |
React / Next.js | App Router ( |
CSS & Styling | Tailwind CSS vs CSS-Module ( |
HTML | Einrückungsstil (2 Leerzeichen / 4 Leerzeichen / Tabs), Attribut-Anführungszeichen-Stil ( |
So funktioniert es
analyzedurchläuft eine Codebasis und analysiert jede Quelldatei ohne externe Binär- oder Compiler-Abhängigkeiten. Ein steckbares Paket spezialisierter Extraktoren läuft über die Parse-Bäume und Quell-Token, um einStyleProfilezu erstellen — einen strukturierten, versionierbaren Fingerabdruck, der alsstyle_profile.jsongespeichert wird.initführtanalyzeaus und injiziert dann dieses Profil in standardmäßige Agenten-Konventionsdateien (CLAUDE.md,AGENTS.md,.cursorrulesusw.), umgeben von sauberen Update-Markierungen (<!-- style-dna:start -->...<!-- style-dna:end -->).generate(optional) verwandelt das Profil in einen System-Prompt und ruft die Claude-API direkt auf, für Teams, die ghostgeschriebenen Code vom Terminal aus wünschen.
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 suiteInstallieren
# 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]"Verwendung
# 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.tsxAls Python-Bibliothek:
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")Testen
pip install -e ".[dev]"
python -m pytest tests/ -vLizenz
Veröffentlicht unter der MIT-Lizenz.
Erstellt von 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