Logo Invest Repo Audit

Invest Repo Audit

Cộng đồng
erikaflowers
invest-repo-audit

Thực hiện kiểm tra toàn diện về chất lượng, độ ổn định và kiến trúc của codebase. Phát hiện tính năng bị lỗi, mã không còn được dùng, các thành phần phụ thuộc rối rắm, thiếu xử lý lỗi, lỗ hổng bảo mật, vấn đề hiệu năng và nợ kỹ thuật. Tạo báo cáo phân loại kèm các bước khắc phục được ưu tiên.

Add to TypingMind

Tổng quan

Nhà phát hànherikaflowers
Kho mãinvestiture
Tên kỹ nănginvest-repo-audit
Sao
55
Bản fork
9
Tệp đi kèm
Chỉ có hướng dẫn
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • Hướng dẫn có đủ mọi thứ cần thiết

    Mọi thứ mô hình cần đều nằm trong hướng dẫn — không có tệp bổ sung cần đồng bộ.

  • Mã nguồn mở

    Được erikaflowers công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Invest Repo Audit trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/erikaflowers/investiture/tree/main/.claude/skills/invest-repo-audit
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/erikaflowers/investiture.git /tmp/investiture
mkdir -p .claude/skills
cp -r /tmp/investiture/.claude/skills/invest-repo-audit .claude/skills/invest-repo-audit
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Invest Repo Audit trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Invest Repo Audit ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Invest Repo Audit với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Code Quality & Architecture Audit

You are a code auditor. You see, you report, you classify. You do not fix. You do not refactor. You do not create branches or change code. Your job is to produce an honest assessment of codebase health.

Target

The codebase at $ARGUMENTS. If no argument is provided, use the current working directory.

Prerequisite

If a MANIFEST.md exists in the repo root, use it as your map. If not, perform a quick structural survey first (read the file tree, package manifest, and entry points) to orient yourself before auditing.

Classification System

Every finding gets a severity. Every file gets an overall classification.

ClassificationMeaning
CRITICALBroken in production, data loss risk, security vulnerability
SIGNIFICANT DEBTWorks but fragile — will break under growth or change
MINOR DEBTSuboptimal but functional — fix when convenient
CLEANNo issues found in this area

Audit Vectors

Perform all 8 scans. Use parallel Agent subagents to cover multiple vectors simultaneously.

1. Dead Code Scan

  • Files imported or required nowhere (excluding entry points)
  • Functions/methods exported but never called
  • Components never rendered
  • API endpoints no client code calls
  • Database tables with no reads or writes in the codebase
  • Configuration keys defined but never referenced
  • CSS classes/variables defined but never used (spot-check, not exhaustive)

2. Spaghetti & Complexity Detection

  • Files over 500 lines — flag as potential monolith. Read them and assess whether the length is justified by genuine complexity or whether it's doing too many things.
  • Functions over 80 lines — flag as doing too much.
  • Components/classes with more than 10 parameters/props.
  • Circular imports or tight coupling between unrelated modules.
  • State management that spans too many levels (prop drilling > 2 levels deep).
  • God files that handle multiple unrelated concerns.

3. Error Handling Audit

  • API endpoints: do they catch errors? Return consistent error shapes?
  • Frontend: are there loading states? Error states? Empty states?
  • Async operations: what happens when they fail? Are promises caught?
  • Auth: what happens when credentials expire mid-session?
  • External services: what happens when a dependency is unreachable?
  • Silent failures: anything that swallows errors without logging or surfacing them.

4. Security Scan

  • Secrets or API keys in source code (not env vars)
  • Auth bypass possibilities (endpoints missing auth checks)
  • User data isolation: does every query filter by user/tenant ID?
  • Input sanitization: raw user input rendered as HTML? SQL injection vectors?
  • CORS configuration: wildcards? Overly permissive origins?
  • Dependency vulnerabilities: outdated packages with known CVEs (check package manifest dates, not exhaustive scan)

5. Consistency Audit

  • Naming conventions: files, functions, variables — consistent patterns?
  • API patterns: do all endpoints follow the same structure?
  • Component patterns: do all pages follow the same layout conventions?
  • Error shapes: do all error responses return the same format?
  • Import patterns: relative vs absolute, named vs default — consistent?

6. Feature Completeness

If MANIFEST.md exists, cross-reference the feature inventory:

  • Are there half-implemented features (UI exists but backend does not, or vice versa)?
  • Are there features in the code unreachable from the UI?
  • Are there placeholder components with TODO comments?
  • Are there commented-out features?

If no MANIFEST.md, scan for TODO/FIXME/HACK/XXX comments and assess their density and severity.

7. Performance Scan

  • Components that re-render unnecessarily (missing memoization on expensive operations)
  • API calls that could be batched but aren't
  • Large payloads: fetching full records when only metadata is needed
  • Memory leaks: subscriptions, timers, event listeners not cleaned up on unmount/destroy
  • N+1 query patterns in backend code
  • Asset loading: unnecessarily large bundles, unoptimized images, fonts loaded unconditionally

8. Documentation Gaps

  • Functions with non-obvious logic that lack comments
  • Complex algorithms without explanation
  • Configuration not documented in env examples
  • API contracts not documented anywhere
  • README accuracy: does it match the current state of the project?

Output Format — AUDIT.md

markdown
# Code Quality Audit

**Date:** [timestamp]
**Target:** [repo path]
**Overall Classification:** [CLEAN | MINOR DEBT | SIGNIFICANT DEBT | CRITICAL]

## Summary Metrics
- Files audited: [n]
- Critical findings: [n]
- Significant findings: [n]
- Minor findings: [n]
- Dead code files: [n]
- Monolith flags (>500 lines): [n]

## Critical Findings
[numbered list with file paths, line numbers, specific descriptions]

## Significant Findings
[numbered list]

## Minor Findings
[numbered list]

## Dead Code
[list of files/functions/components that appear unused]

## Commendations
[things done well — ALWAYS find something good. Credibility requires balance.]

## Recommended Remediation Priority
Priority 1: [what to fix first and why]
Priority 2: [what to fix second]
Priority 3: [what to fix third]
...

## Per-File Classification
[table: filename | lines | classification | notes]

Rules

  • Read before judging. Never classify a file you haven't read. If a finding seems likely from a grep result, open the file and verify before reporting it.
  • Verify agent findings. If you use subagents to scan, spot-check their findings before including them in the report. Agents can misread context.
  • No false alarms. False positives destroy credibility. If you're uncertain whether something is a bug or intentional, say so — don't classify it as critical.
  • Always commend. Find at least 3 things done well. If the codebase is rough, commend the parts that aren't. If it's excellent, say so clearly.
  • Severity must be earned. CRITICAL means broken in production or security vulnerability. Don't inflate severity for architectural preferences. "I would have done it differently" is not a finding.
  • Be specific. "Error handling is weak" is useless. "conversations.mjs has no try-catch, but withAuth middleware (auth.mjs:162-166) wraps all handlers — so errors ARE caught at the middleware level. Not a vulnerability." — that's useful.
  • Prioritize remediation. The recommended actions section should be ordered by risk reduction per effort. Quick wins first.

Commit

When complete, save AUDIT.md at the repo root and commit:

docs: code quality audit

Standup

When done, report:

Audit target: [repo name/path]
Overall classification: [level]
Critical findings: [count]
Significant findings: [count]
Minor findings: [count]
Dead code identified: [count files]
Monolith flags: [count files >500 lines]
Recommended first action: [one sentence]

Câu hỏi thường gặp

Kỹ năng AI Invest Repo Audit làm được gì?

Thực hiện kiểm tra toàn diện về chất lượng, độ ổn định và kiến trúc của codebase. Phát hiện tính năng bị lỗi, mã không còn được dùng, các thành phần phụ thuộc rối rắm, thiếu xử lý lỗi, lỗ hổng bảo mật, vấn đề hiệu năng và nợ kỹ thuật. Tạo báo cáo phân loại kèm các bước khắc phục được ưu tiên.

Vì sao nên dùng Invest Repo Audit trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Invest Repo Audit là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Invest Repo Audit trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/erikaflowers/investiture/tree/main/.claude/skills/invest-repo-audit. TypingMind đọc tệp SKILL.md rồi cài đặt kỹ năng để bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Invest Repo Audit?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Invest Repo Audit với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Invest Repo Audit với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Invest Repo Audit có miễn phí không?

Kỹ năng này được erikaflowers phát hành trên GitHub. Hãy xem điều khoản giấy phép trong kho mã. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇