code-intelligence
Skill1 starsChanged 7 months agoMITView on GitHub
Universal, safe, and professional code modification and refactoring environment for 50+ languages. Use when editing source files to prevent syntax breakage, perform project-wide type-aware renames (LSP), or distill large command output to save context window tokens.
- Installs packages
4 other projects use a version of this.
Adopted by
Most recently taken up by
- WingedGuardian/GENesis-AGItheir own version, first seen Nov 8, 2026
- TIKAZI/TIKAZ-Codex-Engineeringtheir own version, first seen Aug 12, 2026
- dachent/skillstheir own version, first seen Aug 9, 2026
- darinh/copilot-toolstheir own version, first seen Jul 22, 2026
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- WingedGuardian/GENesis-AGI★ 100same name
- dachent/skills★ 27same name
- darinh/copilot-tools★ 1same name
- TIKAZI/TIKAZ-Codex-Engineering★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
We split this skill into the rules it gives an agent
9 rules. 0 are common, 3 are distinctive, and 6 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 33
Validating changes against the AST: before saving.
- Distinctive: line 34
Aborting the save: if the syntax is broken.
- Distinctive: line 39
Before starting intensive work, verify your environment to see which languages and tools are supported.
- Very specific: line 45
Use safe_edit.py for ALL code modifications.
- Very specific: line 72
Always wrap voluminous commands with distiller.py to keep your context lean.
- Very specific: line 77
NO SED: Never use sed or grep -v for code editing.
- Very specific: line 78
CHECK ENV FIRST: Run check-env at the start of a session to understand your capabilities.
- Very specific: line 79
LSP FIRST: If working on a Java or Go project, always run lsp-start first to ensure fast and reliable refactoring.
- Very specific: line 81
INSTALL IF MISSING: If check-env shows missing dependencies (e.g., rope or tree-sitter), you are PERMITTED to run pip install to enable …
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Code Intelligence Skill (Universal Edition)
This skill provides a unified, safe, and professional environment for code modification and refactoring across 50+ languages using AST verification and LSP (Language Server Protocol).
Runtime Requirements
| Requirement | Gemini CLI | Claude Code | Notes |
| Python 3.10+ | ✅ | ✅ | Must be on PATH as python3 |
tree-sitter | Optional | Optional | Enables AST checks for Go/Java/Rust/C++ |
rope | Optional | Optional | Enables Python project-wide rename |
gopls | Optional | Optional | Enables Go rename via LSP |
jdtls / rust-analyzer / clangd | Optional | Optional | Language-specific LSP rename |
To verify your environment, run: python3 safe_edit.py check-env
Skill scripts (safe_edit.py, distiller.py) must be accessible from the working directory or be on PATH. Install dependencies with: pip install -r requirements.txt
🛡️ Why use safe_edit? (Core Mandate)
Standard file edits often lead to syntax breakage, causing you (the agent) to enter a "fix-it" loop that wastes tokens and can lead to permanent code loss or oversimplification if you decide to overwrite the entire file.
safe_edit.py prevents this by:
- Validating changes against the AST before saving.
- Aborting the save if the syntax is broken.
- Preserving your context by preventing unnecessary debugging steps.
1. Environment Diagnostics
Before starting intensive work, verify your environment to see which languages and tools are supported.
- Command:
python3 safe_edit.py check-env - What it checks: Presence of
tree-sitter,rope, and active Language Servers (gopls, jdtls, etc.).
2. Safe Multi-Language Editing
Use safe_edit.py for ALL code modifications. It prevents syntax breakage by verifying code structure before saving.
A. Pre-heating (LSP Warming)
For heavy languages (Java, Rust, C++), start the language server early to build the index in background.
- Command:
python3 safe_edit.py lsp-start <lang> [--root <project_root>] - Example:
python3 safe_edit.py lsp-start java - When to use: At the beginning of the implementation phase if you plan to do refactoring.
B. Smart Replace (Atomic & Verified)
Replaces unique text blocks with mandatory syntax verification.
- Command:
python3 safe_edit.py replace <file> "<old>" "<new>" - Engines:
- Python: Uses builtin
ast(No dependencies required). - Go/Java/Others: Uses
tree-sittergrammars if available.
- Python: Uses builtin
- Rule:
<old>text MUST be unique in the file to avoid ambiguity.
C. Industrial Refactoring (Rename)
Renames symbols across the entire project with full type-awareness.
- Command:
python3 safe_edit.py rename <file> <symbol> <new_name> [--root <project_root>] - Engines:
- Python: Uses
Ropelibrary. - Go: Uses native
goplsCLI for maximum speed and reliability. - Java/Rust/CPP: Uses generic LSP JSON-RPC client.
- Python: Uses
- Behavior: Updates the definition and ALL call-sites/references in the project.
3. Token Saving (Output Distillation)
Always wrap voluminous commands with distiller.py to keep your context lean.
- Example:
python3 distiller.py <tool_name> <command...>
Mandates for Agents
- NO SED: Never use
sedorgrep -vfor code editing. Usesafe_edit.py replace. - CHECK ENV FIRST: Run
check-envat the start of a session to understand your capabilities. - LSP FIRST: If working on a Java or Go project, always run
lsp-startfirst to ensure fast and reliable refactoring. - VERIFY ALWAYS:
safe_edit.py replaceautomatically verifies syntax. If it fails, do NOT attempt to force the write via other tools. - INSTALL IF MISSING: If
check-envshows missing dependencies (e.g.,ropeortree-sitter), you are PERMITTED to runpip installto enable them.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

