source-code-analysis
Skill by antoninoLorenzo
Guides an AI assistant through reading and searching source code in a repository. It is for tasks that need finding files, searching patterns, reading line ranges, and tracing function references.
Install source-code-analysis
Built from the published package, never by AI.
git clone --depth 1 https://github.com/antoninoLorenzo/AI-OPS /tmp/AI-OPS && mkdir -p ~/.claude/skills && cp -r /tmp/AI-OPS/ai_ops/core/tools/load_skill/bundled/source-code-analysis ~/.claude/skills/source-code-analysisRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/antoninoLorenzo/AI-OPS /tmp/AI-OPS && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/AI-OPS/ai_ops/core/tools/load_skill/bundled/source-code-analysis ~/.gemini/antigravity-cli/skills/source-code-analysisAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install source-code-analysis in Antigravity CLI
Skills can run scripts on your machine. Some need an API key: check the README.
About
This agent skill teaches an assistant how to explore a code repository with command-line tools. It covers tree for structure, find for locating files, grep for searching content, sed and head or tail for reading specific lines, and wc for checking file size before reading. It also includes optional AST-aware searching with semgrep.
The skill focuses on tool discipline. It tells the assistant what command to run, in what order, and how to limit output volume. It starts with scoped searches, escalates from filenames to counts to line numbers, and avoids repo-wide context expansion. The source says it does not prescribe a fixed investigation process. It is aimed at developers and assistants that need to understand or audit source code without flooding their context.
Written from the project's SKILL.md and checked against it.
What it can do
- treeShows directory structure first, with depth limits and filters for build noise.
- findLocates files by name, path fragment, or modification time, with output piped to head.
- wcChecks file line counts to decide between a full read and targeted reads.
- grepSearches content in escalating steps, from matching filenames to counts to context lines.
- sedReads a specific line range from a file once grep gives a line number.
- semgrepRuns AST-aware rules that match real syntax instead of raw text, with output redirected to a file.
What you need
- tree
- grep
- find
- sed
Try asking
- Show me the structure of this repository before we read any files.
- Find where the function parse_config is defined and where it is called.
- Use semgrep to find real exec() calls in the src directory, not comments.
Good to know
- Repo-wide grep with large context windows produces very large output on non-trivial codebases.
- semgrep is slower and heavier than grep and is not suited to minified, generated, or binary code.
- The source says the skill does not prescribe a fixed investigation process.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: ai_ops/core/tools/load_skill/bundled/source-code-analysis/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to source-code-analysis
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
source-code-analysis: common questions
When should I use semgrep instead of grep?
The skill says to use semgrep only when grep gives too many false positives from matches inside strings, comments, or partial identifiers. It matches the parsed syntax tree rather than raw text.
How does the skill keep output from flooding context?
It advises running tree and grep scoped to a single file or directory first, checking file size with wc, and redirecting semgrep JSON to a file. It also says to pipe find results to head.
Does the skill follow a fixed step-by-step investigation?
No. The source says it teaches tool discipline and does not prescribe a fixed investigation process, so the assistant should follow the evidence.
How do I install source-code-analysis?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is source-code-analysis free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is source-code-analysis safe to use?
It scores 71 of 100. Grades: maintenance A, licence A, quality B. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to source-code-analysis?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
