generator

作者 context-hub已验证

CTX: a tool that solves the context management gap when working with LLMs like ChatGPT or Claude. It helps developers organize and automatically collect information from their codebase into structured documents that can be easily shared with AI assistants.

338
Stars
21
Forks
PHP
语言
2026/8/23
添加时间

⚠️ 第三方软件声明

本 Skill 为第三方开源软件,独立托管于 GitHub。SkillTip 仅为信息目录,不控制或维护底层仓库。所显示的安全检查为自动化且范围有限,安装前请自行审查源码。

阅读服务条款

安装

添加到你的 Claude Code skills 目录:

# Add to your Claude Code skills
git clone https://github.com/context-hub/generator

快速入门

使用 generator 等 Skills 的指南。

安全报告

已验证

上次扫描:—

{
  "status": "PASSED",
  "issues": []
}

README.md

CTX: Your AI Coding Companion

MCP-powered development toolkit that gives AI full access to your codebase

Docs Json schema Telegram zread

Good morning, LLM

What is CTX?

CTX is a single ~20 MB binary with zero dependencies. No Node.js, no Python, no runtime — just download, connect to your MCP client, and start coding with AI.

Connect it to Claude Desktop, Cursor, Cline, or any MCP-compatible client — and your AI gets direct access to read, write, search, and modify files across your projects.

CTX is designed with Claude Desktop in mind and works best with it. Claude's deep understanding of code combined with CTX's filesystem tools, custom commands, and multi-project support creates a seamless development experience — like having a senior developer who knows your entire codebase sitting right next to you.

Table of Contents

Key Features

🛠 MCP Server — AI Develops Directly in Your Project

CTX provides a built-in MCP server with powerful filesystem tools:

  • Read & write files — AI creates, modifies, and analyzes code directly
  • Search across codebase — text and regex search with context lines
  • PHP structure analysis — class hierarchy, interfaces, and dependencies at a glance
  • Directory exploration — smart filtering by patterns, dates, sizes, and content

⚡ Custom Tools — Turn Any Command into an AI Tool

Define project-specific commands that AI can execute through MCP:

tools:
  - id: run-tests
    description: "Run project tests with coverage"
    type: run
    commands:
      - cmd: vendor/bin/phpunit
        args: [ "--coverage-html", "logs/coverage" ]

  - id: deploy
    description: "Deploy to staging"
    type: run
    schema:
      type: object
      properties:
        branch:
          type: string
          default: "main"
    commands:
      - cmd: ./deploy.sh
        args: [ "{{branch}}" ]

Tests, migrations, linters, deployments — anything your terminal can run, AI can trigger.

📁 Multi-Project Development

Work across multiple microservices simultaneously. AI sees all your projects and can develop cross-cutting features:

projects:
  - name: backend-api
    path: ../backend
    description: "REST API service"

  - name: auth-service
    path: ../auth
    description: "Authentication microservice"

  - name: shared-lib
    path: ../packages/shared
    description: "Shared domain models"

Start a session, ask AI to list available projects, and develop features that span multiple services — all in one conversation.

🎯 Smart Context Generation

Define exactly what context your AI needs. CTX collects code from files, git diffs, GitHub repos, URLs, and more — then structures it into clean markdown documents:

documents:
  - description: User Authentication System
    outputPath: auth.md
    sources:
      - type: file
        sourcePaths: [ src/Auth ]
        filePattern: "*.php"
      - type: git_diff
        commit: "last-week"

📐 Declarative Config with JSON Schema

Everything is configured through context.yaml with full JSON Schema support. Your AI assistant can generate and modify these configs for you — just describe what you need.

ctx init    # Generate initial config
ctx generate  # Build context documents
ctx server  # Start MCP server

Quick Start

Install

Linux / WSL:

curl -sSL https://raw.githubusercontent.com/context-hub/generator/main/download-latest.sh | sh

Windows:

powershell -c "& ([ScriptBlock]::Create((irm 'https://raw.githubusercontent.com/context-hub/generator/main/download-latest.ps1'))) -AddToPath"

Connect to Claude Desktop (or Any MCP Client)

The fastest way — auto-detect OS and configure your MCP client:

ctx mcp:config

Or add manually to your MCP client config:

{
  "mcpServers": {
    "ctx": {
      "command": "ctx",
      "args": [
        "server"
      ]
    }
  }
}

For a specific project:

{
  "mcpServers": {
    "ctx": {
      "command": "ctx",
      "args": [
        "server",
        "-c",
        "/path/to/project"
      ]
    }
  }
}

That's it. Your AI assistant now has full access to your project through MCP.

Optional: Generate Context Documents

If you also want to generate static context files for copy-paste workflows:

cd your-project
ctx init       # Create context.yaml
ctx generate   # Build markdown contexts

How It Works

CTX operates in two modes that complement each other:

MCP Server Mode — AI interacts with your codebase in real-time:

AI Assistant ←→ CTX MCP Server ←→ Your Project Files
                     ↕
              Custom Tools (tests, deploy, lint...)
              Multiple Projects
              Context Documents

Context Generation Mode — build structured documents for any LLM:

context.yaml → Sources → Filters → Modifiers → Markdown Documents

Use Cases

🔧 AI-Powered Development (MCP)

Connect CTX to Claude Desktop or Cursor. Ask your AI to explore the codebase, understand architecture, write new features, run tests, and fix issues — all without leaving the conversation.

🏗 Multi-Service Feature Development

Working on a feature that touches multiple microservices? Register all projects, and AI can read code from one service, understand shared models, and implement changes across the entire stack.

📝 Context for Code Review

Generate context documents with recent git diffs, relevant source files, and architecture overview. Share with reviewers or AI assistants for thorough, informed reviews.

🚀 Onboarding

New team member? Generate a comprehensive project overview — architecture, key interfaces, domain models — in seconds. AI can then answer questions about the codebase with full context.

📚 Documentation Generation

Point CTX at your source code with modifiers like php-signature to extract API surfaces, then let AI generate comprehensive documentation.

Full Documentation

For complete documentation, including all features and configuration options:

https://docs.ctxllm.com

Join Our Community

Join Discord

What you'll find:

  • 💡 Share and discover configurations and workflows
  • 🛠️ Get help with setup and advanced usage
  • 🚀 Showcase your AI development workflows
  • 📢 First to know about new releases

License

This project is licensed under the MIT License.

常见问题

What is generator?

generator is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by context-hub. CTX: a tool that solves the context management gap when working with LLMs like ChatGPT or Claude. It helps developers organize and automatically collect information from their codebase into structured documents that can be easily shared with AI assistants. It has 338 GitHub stars.

Is generator safe to use?

Yes. generator passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.

How do I install generator?

Clone the repository with "git clone https://github.com/context-hub/generator" and add it to your Claude Code skills directory (see the Installation section above).

What programming language is generator written in?

generator is primarily written in PHP. It is open-source under context-hub on GitHub, so you can review or fork the full source.

Are there alternatives to generator?

Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh generator against similar tools.

评论 (0)

暂无评论,成为第一个分享想法的人!

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI 智能体ai-agentsbrainstorming
查看详情

hermes-agent

by NousResearch

10

The agent that grows with you

234,43747,175Python
AI 智能体ai-agentsagent-orchestration
查看详情

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI 智能体claude-codeai-tools
查看详情

claude-code

by anthropics

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

120,03119,897Shell
AI 智能体
查看详情

开发者还喜欢

基于喜欢此 Skill 的开发者投票和收藏

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI 智能体ai-agentsbrainstorming
查看详情

hermes-agent

by NousResearch

10

The agent that grows with you

234,43747,175Python
AI 智能体ai-agentsagent-orchestration
查看详情

n8n

by n8n-io

12

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

201,88160,308TypeScript
MCP 服务器apisai-tools
查看详情

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI 智能体claude-codeai-tools
查看详情