شعار Codebase Onboarding

Codebase Onboarding

المجتمع
brucesongs
codebase-onboarding

Rapidly acquire a mental model of any unfamiliar codebase — from a 500-line script to a 100M+ line monorepo. This skill transforms raw code into structured intelligence: architecture maps, entry points, data flows, security surfaces, and onboarding confidence scores.

Add to TypingMind

نظرة عامة

الناشرbrucesongs
المستودعkali-claw
اسم المهارةcodebase-onboarding
النجوم
70
التفريعات
18
الملفات المرفقة
14
الترخيصMIT
الروابط
  • تعليمات بصيغة Markdown

    ملف SKILL.md يُحمّله النموذج عند الحاجة، فلا يستهلك توكنات إلا عندما يَرِد طلب ذو صلة فعلًا.

  • تعمل مع أي نموذج لغوي كبير

    مهارات الذكاء الاصطناعي مكتوبة بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا تعمل مع GPT أو Claude أو Gemini أو Grok أو نموذج محلي.

  • الملفات المرفقة: 14

    نصوص برمجية وقوالب ومراجع يمكن للنموذج قراءتها أثناء عمله. الملفات للقراءة فقط ولا تُنفّذ أبدًا.

  • مفتوحة المصدر

    نشرها brucesongs على GitHub. اطّلع على المصدر قبل تثبيتها.

التثبيت

ثبّت مهارة الذكاء الاصطناعي Codebase Onboarding في TypingMind لاستخدامها مع أي نموذج لغوي كبير، أو أضفها إلى وكيل ذكاء اصطناعي آخر يقرأ SKILL.md.

1

التثبيت في TypingMind

يُثبّت TypingMind المهارة مباشرةً من مجلدها على GitHub — فيقرأ SKILL.md، ويجمع ملفات الموارد في حزمة، ويحفظ النتيجة محليًا.

  1. افتح التطبيق وانتقل إلى «الإضافات» ثم «المهارات».
  2. اختر «تثبيت من GitHub».
  3. الصق رابط مجلد المهارة الموضّح أدناه وأكّد التثبيت.
    https://github.com/brucesongs/kali-claw/tree/main/skills/codebase-onboarding
  4. فعّل المهارة في كل محادثة تريد إتاحتها فيها.
الإضافات ← المهارات ← إضافة مهارة ← من رابط GitHub، ثم الصق رابط المجلد واضغط على «متابعة».
2

التثبيت في وكيل ذكاء اصطناعي آخر

يمكن لأي وكيل ذكاء اصطناعي يقرأ تنسيق Agent Skills استخدام هذه المهارة — انسخ المجلد إلى مجلد المهارات الخاص بذلك الوكيل.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/brucesongs/kali-claw.git /tmp/kali-claw
mkdir -p .claude/skills
cp -r /tmp/kali-claw/skills/codebase-onboarding .claude/skills/codebase-onboarding
أعد تشغيل Claude Code بعد النسخ ليتعرّف على المهارة الجديدة.

استخدمها في TypingMind

فعّل Codebase Onboarding في أي محادثة على TypingMind وسيتولى النموذج الباقي. تتضمن مطالبة النظام اسمها ووصفها، وبمجرد ورود طلب ذي صلة، يُحمّل النموذج التعليمات الكاملة تلقائيًا — فلا تحتاج إلى استدعائها يدويًا، ولا تستهلك أي توكنات حتى تُستخدم فعليًا.

يُحمّل النموذج مهارة Codebase Onboarding تلقائيًا بمجرد ورود طلب ذي صلة بها.

تعمل مع أي نموذج ذكاء اصطناعي

مهارات الذكاء الاصطناعي هي تعليمات بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا لا ترتبط Codebase Onboarding بالنموذج الذي كُتبت له. ثبّتها مرة واحدة في TypingMind واستخدمها مع GPT-5 أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو نموذج محلي تشغّله بنفسك — كل ذلك باستخدام مفاتيح API الخاصة بك.

  • تُحمَّل عند الحاجة فقط

    تتضمن مطالبة النظام الاسم والوصف فقط. وتُجلب التعليمات عند أول طلب ذي صلة، لذا لا تستهلك تعليمات المهارة أي توكنات ما دامت المهارة غير مستخدمة.

  • بدّل النماذج أثناء المحادثة

    لأن المهارة تعليمات وليست شيفرة، فإن تغيير النموذج لا يعطّلها — فالنموذج التالي يقرأ ملف SKILL.md نفسه.

تعليمات المهارة

هذا هو محتوى SKILL.md الذي يُحمّله النموذج. اقرأه قبل التثبيت — فالمهارة عبارة عن تعليمات سيتبعها نموذجك.

Codebase Onboarding

Summary

This skill transforms raw code into structured intelligence: architecture maps, entry points, data flows, security surfaces, and onboarding confidence scores.

Domain: knowledge

Skill Identity

AttributeValue
DomainKnowledge Operations
Skill IDcodebase-onboarding
Version1.0.0
Hacker LawsLaw 1 (Know Your Battlefield), Law 3 (Intelligence Over Force), Law 9 (Systematic Over Random)
Related Skillsknowledge-ops, deep-research, social-intelligence

Purpose

Rapidly acquire a mental model of any unfamiliar codebase — from a 500-line script to a 100M+ line monorepo. This skill transforms raw code into structured intelligence: architecture maps, entry points, data flows, security surfaces, and onboarding confidence scores.

In security contexts, codebase onboarding is the first step before code audits, vulnerability research, exploit development, and supply chain analysis.

Scope Modes

Three modes based on what you need to know, not how much time you have:

ModeWhen to UseOutput
TargetedYou know what you're looking for (e.g., "find all auth code")Focused map of specific subsystem
ExploratoryYou need to understand a feature area or moduleModule-level architecture + data flows
ComprehensiveFull audit, exploit research, or security reviewComplete intelligence package

Choose mode before starting. Switching modes mid-session is allowed but requires re-baselining.

Phase 0: Search-First (All Modes)

Before reading any code:

  1. Find existing documentation

    • README, CONTRIBUTING, ARCHITECTURE, docs/, wiki/
    • OpenAPI/Swagger specs, Protobuf definitions
    • CI/CD config (reveals build structure and test commands)
  2. Identify the skeleton

    • package.json, go.mod, Cargo.toml, requirements.txt, pom.xml, build.gradle
    • Entry points: main(), app.py, index.js, server.go
    • Config files: .env.example, config/, settings.py
  3. Detect framework signatures

    • Import patterns, directory names, config file names
    • See Language Support section for framework detection by language
  4. Run static index (Targeted/Comprehensive modes)

    • ctags, cscope, or language server for symbol maps
    • File tree with line counts: find . -name "*.py" | xargs wc -l | sort -rn | head -50

Methodology

Phase 1: Orientation

  • Count files, LOC, and language distribution
  • Identify primary language(s) and detect framework
  • Map top-level directory structure to functional areas
  • Find entry points and main execution paths

Phase 2: Architecture Mapping

  • Trace request/data flow from entry point to persistence
  • Identify layers: API → Business Logic → Data Access → Storage
  • Map inter-service dependencies (microservices) or module boundaries (monolith)
  • Detect shared libraries, utilities, middleware

Phase 3: Security Surface Analysis

  • Authentication and authorization code locations
  • Input validation and sanitization points
  • External integrations (APIs, databases, message queues)
  • Secret/credential handling
  • Known dangerous patterns by language

Phase 4: Deep Dive (Comprehensive mode only)

  • Critical path tracing for key operations
  • Data flow for sensitive operations (payments, auth, PII)
  • Dependency vulnerability surface (outdated packages, CVE exposure)
  • Test coverage gaps that indicate under-reviewed areas

Phase 5: Knowledge Consolidation

  • Generate structured output (see Output Format below)
  • Record confidence scores per subsystem
  • Identify gaps for follow-up research
  • Hand off to knowledge-ops for persistence

Language Support

Tier 1 — Full Automation Support (75–90% automated)

LanguageFrameworks DetectedEntry Point Detection
PythonDjango, Flask, FastAPI, Celerymain.py, app.py, manage.py, wsgi.py
JavaScriptExpress, React, Next.js, NestJSindex.js, server.js, app.js
TypeScriptSame as JS + Angularmain.ts, index.ts, server.ts
JavaSpring Boot, Quarkus, MicronautApplication.java, Main.java, pom.xml
GoGin, Echo, Chi, gRPCmain.go, cmd/, internal/
PHPLaravel, Symfony, WordPressindex.php, artisan, composer.json

Tier 2 — Partial Automation Support (50–70% automated)

LanguageNotes
C / C++ctags/cscope required; complex build systems (CMake, Makefile) need manual interpretation
RustCargo workspace support good; unsafe block detection is primary security focus
RubyRails well-supported; Rack-based apps need manual routing trace
C# / .NETSolution file parsing; dependency injection containers require manual tracing

Tier 3 — Manual-Heavy (20–40% automated)

Kotlin, Scala, Swift, Objective-C, Erlang, Elixir, Haskell, COBOL, and other languages require primarily manual analysis. Use Phase 0 docs-first approach and lean on test files for behavior discovery.

100M+ Line Strategy

For very large codebases (100M+ LOC):

  1. Index First: Run ctags/cscope before reading any files
  2. Smart Sampling: Focus on files with highest churn (git log), most imports, or security-critical paths
  3. Divide & Conquer: Treat each top-level module as a separate Targeted-mode session
  4. Boundary Focus: Understand module interfaces (APIs, contracts) before internals
  5. Avoid Full Reads: Never attempt to read entire large files; sample entry, middle, and exit sections

Output Format

Confidence Score

Rate onboarding completeness per area:

ScoreMeaning
0–20Uncharted — no meaningful understanding
21–40Partial — know structure, not behavior
41–60Functional — can navigate, some gaps
61–80Solid — understand core flows and surfaces
81–100Expert — deep understanding, audit-ready

Report as: Overall: 72/100 | Auth: 85 | Data Layer: 60 | API Surface: 78 | Internal Logic: 65

Structured Intelligence Package

json
{
  "project": "target-name",
  "analyzed_at": "2026-05-11",
  "mode": "Comprehensive",
  "language_primary": "Go",
  "framework": "Gin + GORM",
  "loc_total": 85000,
  "confidence": {
    "overall": 72,
    "auth": 85,
    "data_layer": 60,
    "api_surface": 78,
    "internal_logic": 65
  },
  "entry_points": ["cmd/server/main.go", "cmd/worker/main.go"],
  "architecture": "Monolith with event-driven background workers",
  "security_surfaces": {
    "auth": "JWT via middleware/auth.go",
    "input_validation": "Partial — missing in admin routes",
    "secrets": "env vars via config/config.go",
    "dangerous_patterns": ["SQL concatenation in reports/query.go:145"]
  },
  "gaps": ["Payment flow not traced", "gRPC service definitions not reviewed"],
  "next_steps": ["Audit reports/query.go for SQLi", "Review payment/ module"]
}

Architecture Diagram (Mermaid)

Use Cases

  1. Pre-Audit Onboarding: Map attack surface before security audit
  2. Exploit Research: Locate vulnerable code patterns in target software
  3. Supply Chain Analysis: Understand third-party library integration points
  4. Incident Response: Rapidly understand compromised codebase structure
  5. CVE Reproduction: Locate affected code for known vulnerabilities

Hacker Laws Alignment

  • Law 1 (Know Your Battlefield): You cannot exploit what you don't understand
  • Law 3 (Intelligence Over Force): Systematic mapping beats random file reading
  • Law 9 (Systematic Over Random): Phase-based approach ensures nothing is missed

Detection Methods

Code Repository Access Anomalies

  • Off-hours access: Agent accessing repositories at 3 AM local; outside typical dev hours.
  • Mass cloning: Sudden spike in git clone operations; large data egress from source control.
  • Unusual file reads: Reads of .env, secrets.yml, *.pem, id_rsa files by automated agents.
  • Cross-repo correlation: Same agent accessing many unrelated repositories.

Agent Activity Indicators

  • Tool call patterns: Sequential calls to read_file → search_code → send_http (exfil chain).
  • Token consumption: Sustained >100K tokens per session; context-stuffing attack pattern.
  • Filesystem traversal: Reads outside declared working directory; attempts to access /etc/, ~/.ssh/.

SIEM Detection Rules

  • Splunk SPL: index=agent tool="read_file" | where match(path, "(\.env|secrets|\.pem)")
  • GitHub Audit Log: Alert on git.clone events from new IP geolocation.

Defense Evasion Techniques

Stealth Enumeration

  • Slow & low traversal: Pace file reads below rate-limit threshold.
  • Use legitimate paths: Access only typical project files; avoid /etc/, ~/.ssh/ (suspicious).
  • Off-hours operation: Run during typical dev hours to blend with normal activity.
  • Cache file contents: Avoid re-reading same files; reduces read-count anomaly.

Exfiltration Stealth

  • Piggyback on legitimate commits: Hide exfil data in legitimate-looking diff.
  • Distributed commits: Spread exfil across multiple commits/PRs (one chunk each).
  • Encoding tricks: Base64 / hex encode sensitive data to evade DLP scanning.
  • Side-channel exfil: Encode data in commit timing / message length.

Integration

  • Feed output to knowledge-ops for cross-session persistence
  • Use deep-research to research identified frameworks and known vulnerabilities
  • Use exa-search to find CVEs for detected dependency versions
  • Record security surfaces in mission memory before starting active testing

الملفات المرفقة

يقرأ النموذج هذه الملفات عند الحاجة ما دامت المهارة محمّلة. وهي متاحة للقراءة ولا تُنفّذ أبدًا.

الأسئلة الشائعة

ماذا تفعل مهارة الذكاء الاصطناعي Codebase Onboarding؟

Rapidly acquire a mental model of any unfamiliar codebase — from a 500-line script to a 100M+ line monorepo. This skill transforms raw code into structured intelligence: architecture maps, entry points, data flows, security surfaces, and onboarding confidence scores.

لماذا تستخدم Codebase Onboarding على TypingMind؟

لأنك تثبّتها مرة واحدة وتستخدمها مع أي نموذج. مهارة Codebase Onboarding عبارة عن نص Markdown وليست شيفرة خاصة بمزود بعينه، لذا تعمل المهارة نفسها مع GPT-5 أو Claude أو Gemini أو Grok أو نموذج محلي، ويمكنك تبديل النموذج أثناء المحادثة دون تعطّل المهارة. يعمل TypingMind بمفاتيح API الخاصة بك، فتدفع للمزودين مباشرةً بدلًا من اشتراك لكل مقعد، وتبقى مهاراتك ومحادثاتك في مساحة التخزين الخاصة بك.

كيف أثبّت Codebase Onboarding في TypingMind؟

في TypingMind، افتح «الإضافات»، ثم «المهارات»، ثم اختر «التثبيت من GitHub» والصق https://github.com/brucesongs/kali-claw/tree/main/skills/codebase-onboarding. يقرأ TypingMind ملف SKILL.md الخاص بالمهارة، ويجمع ملفاتها ويثبّتها كمهارة يمكنك تفعيلها لكل محادثة على حدة.

ما نماذج الذكاء الاصطناعي التي يمكنها استخدام Codebase Onboarding؟

أي نموذج تربطه في TypingMind. مهارات الذكاء الاصطناعي عبارة عن تعليمات Markdown وليست شيفرة خاصة بمزود بعينه، لذا يمكن لكل من GPT وClaude وGemini وGrok والنماذج المحلية تحميل هذه المهارة عندما يتوافق الطلب معها.

كم نموذج ذكاء اصطناعي يمكنني استخدامه مع Codebase Onboarding؟

أي عدد تريده. ما دام النموذج يدعم المهارات، يمكنك استخدام Codebase Onboarding معه، سواء كان GPT أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو غيرها، وكل ذلك على TypingMind باستخدام مفاتيح API الخاصة بك.

هل مهارة الذكاء الاصطناعي Codebase Onboarding مجانية؟

نعم. نشرها brucesongs على GitHub بموجب ترخيص MIT. لا تدفع إلا لمزود الذكاء الاصطناعي الخاص بك مقابل التوكنات التي تستخدمها.

ما هي مهارات الذكاء الاصطناعي؟

مهارة الذكاء الاصطناعي حزمة تعليمات قابلة لإعادة الاستخدام تعلّم نموذج الذكاء الاصطناعي كيفية تنفيذ مهمة محددة. وتتبع تنسيق Agent Skills المفتوح: ملف SKILL.md يتضمن اسمًا ووصفًا، إلى جانب أي نصوص برمجية أو قوالب أو ملفات مرجعية قد يحتاج إليها النموذج. لا يقرأ النموذج التعليمات إلا عندما يتوافق طلبك مع المهارة، لذا لا تترتب على المهارة المثبتة أي تكلفة حتى تُستخدم.

كيف تختلف مهارات الذكاء الاصطناعي عن الإضافات أو موصلات MCP؟

تمنح الإضافة أو موصل MCP النموذج أدوات جديدة يمكنه استدعاؤها، وهي شيفرة تُنفَّذ في مكان ما وتُرجع نتيجة. أما مهارة الذكاء الاصطناعي فتزوّد النموذج بالمعرفة ومنهجية العمل: كيفية التعامل مع مهمة، والخطوات التي ينبغي اتباعها، وما ينبغي أن تكون عليه المخرجات الجيدة. المهارات عبارة عن نصوص Markdown، لذا لا تحتاج إلى خادم أو مفتاح API أو بيئة تشغيل، وتعمل مع أي نموذج.

عرض الكل

أنشئ مساحة عملك للذكاء الاصطناعي الآن

اشترك في نشرتنا الإخبارية لتصلك أخبار الميزات الجديدة والهدايا القادمة 👇