Skip to content
Back to search

abcoder

deep, reliable and confidential coding-context

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/cloudwego--abcoder/badge.svg)](/listings/cloudwego--abcoder)

HTML

<a href="/listings/cloudwego--abcoder"><img src="/api/listings/cloudwego--abcoder/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Claude Code Integration

ABCoder provides deep integration with [Claude Code](https://claude.ai/code) through the AST-Driven Coding workflow, enabling hallucination-free code analysis and precise execution. Check [Claude Code Specification](docs/claude-code-spec.md) for more details.

Setup

Use the `init-spec` command to automatically configure Claude Code integration for your project:

# Install ABCoder
go install github.com/cloudwego/abcoder@latest

# Run init-spec in your project directory (optional: specify target path)
cd /path/to/your/project
abcoder init-spec

The `init-spec` command will: 1. Copy `.claude` directory to your project root 2. Configure MCP servers in `~/.claude.json`: - `abcoder`: for code analysis using AST - `sequential-thinking`: for complex problem decomposition 3. Replace all `{{CLAUDE_HOME_PATH}}` placeholders with actual project paths

Start Coding with Claude Code

Once setup, you can start coding with Claude Code:

1. Start Claude Code in your project directory 2. Use slash common `/abcoder:schedule <problem_desc>` to address your feature/requirement/issue, and ABCoder will help you analyze the codebase and design a technical solution. 3. Once all questions are set, use slash common `/abcoder:task <task_name>` to create a coding task(specification) 4. Recheck the task using `/abcoder:recheck <task_name>` before real implementation 5. Begin coding! Claude Code will process the task step by step according to the specification, leveraging the power of AST-driven analysis.

AST-Driven Coding Workflow

[`.claude/hooks`](internal/cmd/assets/.claude/hooks) provide a 4-layer analysis chain from repository to node details:

list_repos → get_repo_structure → get_package_structure → get_file_structure → get_ast_node
     │              │                      │                       │                    │
     └── repo_name  └── mod/pkg list       └── file list           └── node list        └── dependencies/references

Claude Code Slash Commands

[`.claude/commands`](internal/cmd/assets/.claude/commands) provide three custom slash commands to streamline development:

| Command | Function | Description | |---------|----------|-------------| | [`/abcoder:schedule` <task_desc>](internal/cmd/assets/.claude/commands/abcoder/schedule.md) | Design implementation | Analyze codebase by using ABCoder, design technical solution | | [`/abcoder:task <name>`](internal/cmd/assets/.claude/commands/abcoder/task.md) | Create coding task | Generate standardized CODE_TASK document | | [`/abcoder:recheck <task>`](internal/cmd/assets/.claude/commands/abcoder/recheck.md) | Verify solution | Critically check CODE_TASK feasibility, useful when a CODE_TASK contains external dependencies |

Workflow

User Request
    │
    ▼
/abcoder:schedule ──────────→ Design Solution (ABCoder Analysis)
    │                          │
    ▼                          ▼
/abcoder:task ─────────→ CODE_TASK (with Technical Specs, including accurate `get_ast_node` call args)
    │                          │
    ▼                          ▼
/abcoder:recheck ────→ Verify Solution (ABCoder Validation. After `/abcoder:task` Claude Code will tell you what the external dependencies CODE_TASK contains, use `/abcoder:recheck` to analyze external ast_node and technical detail with ABCoder)
    │                          │
    ▼                          ▼
Start coding(sub-agent) ─────────→ Execute Implementation

Configuration Files

| File | Purpose | |------|---------| | [`CLAUDE.md`](internal/cmd/assets/.claude/CLAUDE.md) | Core AST-Driven Coder role definition | | [`settings.json`](internal/cmd/assets/.claude/settings.json) | Hooks and permissions configuration | | [`hooks/`](internal/cmd/assets/.claude/hooks/) | Automation scripts (parse/prompt/reminder) | | [`commands/`](internal/cmd/assets/.claude/commands/) | Slash command definitions (abcoder:task/abcoder:schedule/abcoder:recheck) |

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 247 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # ABCoder: AI-Based Coder(AKA: A Brand-new Coder)
  2. ![ABCoder](images/ABCoder.png)
  3. # Overview
  4. ABCoder, an AI-oriented Code-processing **Framework**, is designed to enhance and extend the coding context for Large-Language-Model (LLM), finally boosting the development of AI-assisted-programming applications.
  5. ## Features
  6. - Universal Abstract-Syntax-Tree (UniAST), a language-independent, AI-friendly specification of code information, providing a boundless, flexible and structural coding context for both AI and humans.
  7. - General Parser, parses arbitrary-language codes to UniAST.
  8. - General Writer transforms UniAST back to code.
  9. - **Code-Retrieval-Augmented-Generation (Code-RAG)**, provides a set of MCP tools to help the LLM understand code repositories precisely and locally. And it can support both in-workspace and out-of-workspace third-party libraries simultaneously -- I guess you are thinking about [DeepWiki](https://deepwiki.org) and [context7](https://github.com/upstash/context7), but ABCoder is more reliable and confidential -- no need to wait for their services to be done, and no worry about your codes will be uploaded!
  10. Based on these features, developers can easily implement or enhance their AI-assisted programming applications, such as reviewing, optimizing, translating, etc.
  11. ## Universal Abstract-Syntax-Tree Specification
  12. see [UniAST Specification](docs/uniast-zh.md)
  13. # Quick Start
  14. ## Claude Code Integration
  15. ABCoder provides deep integration with [Claude Code](https://claude.ai/code) through the AST-Driven Coding workflow, enabling hallucination-free code analysis and precise execution. Check [Claude Code Specification](docs/claude-code-spec.md) for more details.
  16. ### Setup
  17. Use the `init-spec` command to automatically configure Claude Code integration for your project:
  18. ```bash
  19. # Install ABCoder
  20. go install github.com/cloudwego/abcoder@latest
  21. # Run init-spec in your project directory (optional: specify target path)
  22. cd /path/to/your/project
  23. abcoder init-spec
  24. ```
  25. The `init-spec` command will:
  26. 1. Copy `.claude` directory to your project root
  27. 2. Configure MCP servers in `~/.claude.json`:
  28. - `abcoder`: for code analysis using AST
  29. - `sequential-thinking`: for complex problem decomposition
  30. 3. Replace all `{{CLAUDE_HOME_PATH}}` placeholders with actual project paths
  31. ### Start Coding with Claude Code
  32. Once setup, you can start coding with Claude Code:
  33. 1. Start Claude Code in your project directory
  34. 2. Use slash common `/abcoder:schedule <problem_desc>` to address your feature/requirement/issue, and ABCoder will help you analyze the codebase and design a technical solution.
  35. 3. Once all questions are set, use slash common `/abcoder:task <task_name>` to create a coding task(specification)
  36. 4. Recheck the task using `/abcoder:recheck <task_name>` before real implementation
  37. 5. Begin coding! Claude Code will process the task step by step according to the specification, leveraging the power of AST-driven analysis.
  38. ### AST-Driven Coding Workflow
  39. [`.claude/hooks`](internal/cmd/assets/.claude/hooks) provide a 4-layer analysis chain from repository to node details:
  40. ```
  41. list_repos → get_repo_structure → get_package_structure → get_file_structure → get_ast_node
  42. │ │ │ │ │
  43. └── repo_name └── mod/pkg list └── file list └── node list └── dependencies/references
  44. ```
  45. ### Claude Code Slash Commands
  46. [`.claude/commands`](internal/cmd/assets/.claude/commands) provide three custom slash commands to streamline development:
  47. | Command | Function | Description |
  48. |---------|----------|-------------|
  49. | [`/abcoder:schedule` <task_desc>](internal/cmd/assets/.claude/commands/abcoder/schedule.md) | Design implementation | Analyze codebase by using ABCoder, design technical solution |
  50. | [`/abcoder:task <name>`](internal/cmd/assets/.claude/commands/abcoder/task.md) | Create coding task | Generate standardized CODE_TASK document |
  51. | [`/abcoder:recheck <task>`](internal/cmd/assets/.claude/commands/abcoder/recheck.md) | Verify solution | Critically check CODE_TASK feasibility, useful when a CODE_TASK contains external dependencies |
  52. ### Workflow
  53. ```
  54. User Request
  55. │
  56. ▼
  57. /abcoder:schedule ──────────→ Design Solution (ABCoder Analysis)
  58. │ │
  59. ▼ ▼
  60. /abcoder:task ─────────→ CODE_TASK (with Technical Specs, including accurate `get_ast_node` call args)
  61. │ │
  62. ▼ ▼
  63. /abcoder:recheck ────→ Verify Solution (ABCoder Validation. After `/abcoder:task` Claude Code will tell you what the external dependencies CODE_TASK contains, use `/abcoder:recheck` to analyze external ast_node and technical detail with ABCoder)
  64. │ │
  65. ▼ ▼
  66. Start coding(sub-agent) ─────────→ Execute Implementation
  67. ```
  68. ### Configuration Files
  69. | File | Purpose |
  70. |------|---------|
  71. | [`CLAUDE.md`](internal/cmd/assets/.claude/CLAUDE.md) | Core AST-Driven Coder role definition |
  72. | [`settings.json`](internal/cmd/assets/.claude/settings.json) | Hooks and permissions configuration |
  73. | [`hooks/`](internal/cmd/assets/.claude/hooks/) | Automation scripts (parse/prompt/reminder) |
  74. | [`commands/`](internal/cmd/assets/.claude/commands/) | Slash command definitions (abcoder:task/abcoder:schedule/abcoder:recheck) |
  75. | [`tmpls/ABCODER_CODE_TASK.md`](internal/cmd/assets/.claude/tmpls/ABCODER_CODE_TASK.md) | Coding task template |
  76. ### Dependencies
  77. - Claude Code CLI
  78. - ABCoder MCP server (provides `mcp__abcoder` tools)
  79. - Sequential-thinking MCP server (provides `mcp__sequential_thinking` tools, automatically configured by init-spec)
  80. > For detailed configuration, see [claude-code-spec.md](docs/claude-code-spec.md)
  81. > Watch the demo video [here](https://github.com/cloudwego/abcoder/pull/141)
  82. ## Use ABCoder as a MCP server
  83. 1. Install ABCoder:
  84. ```bash
  85. go install github.com/cloudwego/abcoder@latest
  86. ```
  87. 2. Use ABCoder to parse a repository to UniAST (JSON)
  88. ```bash
  89. abcoder parse {language} {repo-path} -o xxx.json
  90. ```
  91. ABCoder will try to install any dependency automatically.
  92. In case of failure (or if you want to customize installation), refer to the [docs](./docs/lsp-installation-en.md).
  93. For example, to parse a Go repository:
  94. ```bash
  95. git clone https://github.com/cloudwego/localsession.git localsession
  96. abcoder parse go localsession -o /abcoder-asts/localsession.json
  97. ```
  98. 3. Integrate ABCoder's MCP tools into your AI agent.
  99. ```json
  100. {
  101. "mcpServers": {
  102. "abcoder": {
  103. "command": "abcoder",
  104. "args": [
  105. "mcp",
  106. "{the-AST-directory}"
  107. ]
  108. }
  109. }
  110. }
  111. ```
  112. 4. Enjoy it!
  113. Try to click and watch the video below:
  114. <div align="center">
  115. [<img src="images/abcoder-hertz-trae.png" alt="MCP" width="500"/>](https://www.bilibili.com/video/BV14ggJzCEnK)
  116. </div>
  117. ## Tips:
  118. - You can add more repo ASTs into the AST directory without restarting abcoder MCP server.
  119. - Try to use [the recommended prompt](llm/prompt/analyzer.md) and combine planning/memory tools like [sequential-thinking](https://github.com/modelcontextprotocol/servers/tree/main/src/sequentialthinking) in your AI agent.
  120. ## Use ABCoder as an Agent (WIP)
  121. You can also use ABCoder as a command-line Agent like:
  122. ```bash
  123. export API_TYPE='{openai|ollama|ark|claude}'
  124. export API_KEY='{your-api-key}'
  125. export MODEL_NAME='{model-endpoint}'
  126. abcoder agent {the-AST-directory}
  127. ```
  128. For example:
  129. ```bash
  130. $ API_TYPE='ark' API_KEY='xxx' MODEL_NAME='zzz' abcoder agent ./testdata/asts
  131. Hello! I'm ABCoder, your coding assistant. What can I do for you today?
  132. $ What does the repo 'localsession' do?
  133. The `localsession` repository appears to be a Go module (`github.com/cloudwego/localsession`) that provides functionality related to managing local sessions. Here's a breakdown of its structure and purpose:
  134. ...
  135. If you'd like to explore specific functionalities or code details, let me know, and I can dive deeper into the relevant files or nodes. For example:
  136. - What does `session.go` or `manager.go` implement?
  137. - How is the backup functionality used?
  138. $ exit
  139. ```
  140. - NOTICE: This feature is Work-In-Progress. It only supports code analysis at present.
  141. # Supported Languages
  142. ABCoder currently supports the following languages:
  143. | Language | Parser | Writer |
  144. | -------- | ------ | ----------- |
  145. | Go | ✅ | ✅ |
  146. | Rust | ✅ | Coming Soon |
  147. | C | ✅ | Coming Soon |
  148. | Python | ✅ | Coming Soon |
  149. | JS/TS | ✅ | Coming Soon |
  150. | Java | ✅ | Coming Soon |
  151. # Getting Involved
  152. We encourage developers to contribute and make this tool more powerful. If you are interested in contributing to ABCoder
  153. project, kindly check out our guide:
  154. - [Parser Extension](docs/parser-zh.md)
  155. > Note: This is a dynamic README and is subject to changes as the project evolves.
  156. # Contact Us
  157. - How to become a member: [COMMUNITY MEMBERSHIP](https://github.com/cloudwego/community/blob/main/COMMUNITY_MEMBERSHIP.md)
  158. - Issues: [Issues](https://github.com/cloudwego/abcoder/issues)
  159. - Lark: Scan the QR code below with [Register Feishu](https://www.feishu.cn/en/) to join our CloudWeGo/abcoder user group.
  160. &ensp;&ensp;&ensp; <img src="images/lark_group_zh.png" alt="LarkGroup" width="200"/>
  161. # Contributors
  162. Thank you for your contribution to ABCoder!
  163. [![Contributors](https://contrib.rocks/image?repo=cloudwego/abcoder)](https://github.com/cloudwego/abcoder/graphs/contributors)
  164. # License
  165. This project is licensed under the [Apache-2.0 License](LICENSE-APACHE).

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.