
Analyze Project
Map a deep learning repo read-only—training, inference, and eval entrypoints, configs, and suspicious patterns—before you let an agent patch model code.
Overview
analyze-project is an agent skill most often used in Validate (also Build, Ship) that read-only maps deep learning repos and flags suspicious patterns without modifying code.
Install
npx skills add https://github.com/lllllllama/rigorpilot-skills --skill analyze-projectWhat is this skill?
- Read-only Rigor Analyze / Rigor Audit stance—no repository patching by default
- AST and path heuristics to surface train, infer, eval, and model entrypoint candidates
- Summarizes config and script layout with conservative insertion-point suggestions
- Flags suspicious patterns as unverified heuristics, not confirmed bugs
- Forbids heavy training or evaluation runs unless explicitly requested
- ENTRYPOINT_PATTERNS cover train, infer, eval, and model filename heuristics
Adoption & trust: 32.3k installs on skills.sh; 412 GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
You inherited a deep learning codebase and cannot tell which scripts train, infer, or evaluate—or whether odd patterns are real bugs.
Who is it for?
Indie ML builders exploring unfamiliar research repos who want orientation and risk signals before autonomous agents edit training code.
Skip if: Greenfield apps with no ML layout, or when you already need automated training runs and code fixes in the same session.
When should I use this skill?
Analyze a deep learning project conservatively; explain model structure, training and inference entrypoints, config relationships, insertion points, and suspicious patterns without modifying code.
What do I get? / Deliverables
You receive a conservative map of entrypoints, config relationships, insertion hints, and heuristic flags—ready for human review before any patches or GPU jobs.
- Structured summary of entrypoints and config layout
- Conservative insertion-point notes
- Unverified suspicious-pattern flags for human follow-up
Recommended Skills
Journey fit
Spans multiple journey phases - primary shelf plus alternate fits below.
Conservative structural analysis belongs early when you are deciding whether a research codebase is understandable and safe to extend. Prototype subphase covers spiking on unfamiliar ML repos where you need orientation without kicking off training jobs or drive-by edits.
Where it fits
Spike a forked paper repo to list train/infer scripts before deciding to productize.
Plan where to hook an API around an existing inference demo without touching weights yet.
Pre-merge review that documents suspicious training loops as unverified flags for maintainers.
Re-map repo layout after a large upstream merge to see which entrypoints moved.
How it compares
Read-only repository MRI for DL projects—not a training orchestrator or generic linter.
Common Questions / FAQ
Who is analyze-project for?
Solo developers and tiny teams working on deep learning code who want a cautious audit trail before agents or humans change model or training paths.
When should I use analyze-project?
When onboarding to a DL repo during validate prototyping, before build integrations that touch training scripts, or during ship review when you need entrypoint clarity without edits.
Is analyze-project safe to install?
It is designed read-only and avoids heavy jobs by policy, but still reads repository files; review the Security Audits panel on this page before running against proprietary checkpoints or secrets-heavy trees.
SKILL.md
READMESKILL.md - Analyze Project
display_name: Rigor Analyze / Rigor Audit short_description: Rigor Analyze / Rigor Audit read-only mode for repository mapping and suspicious pattern review. default_prompt: Analyze this deep learning project conservatively. Explain model structure, training and inference entrypoints, config relationships, likely insertion points, and suspicious implementation patterns without modifying code. # Analysis Policy ## Default stance Prefer structural understanding over action. ## Required behavior - identify likely training, inference, and evaluation entrypoints - summarize config and script layout - highlight insertion points conservatively - flag suspicious implementation patterns as unverified heuristics - keep recommendations low-ego and review-friendly ## Forbidden behavior - patching repository code - claiming a suspicious pattern is a confirmed bug without evidence - running heavy training or evaluation jobs by default #!/usr/bin/env python3 """Read-only analysis for deep learning research repositories.""" from __future__ import annotations import argparse import ast import json import re from pathlib import Path from typing import Any, Dict, Iterable, List, Optional ENTRYPOINT_PATTERNS = { "train": re.compile(r"(train|trainer|fit|pretrain)", re.IGNORECASE), "infer": re.compile(r"(infer|inference|demo|predict|serve)", re.IGNORECASE), "eval": re.compile(r"(eval|evaluate|validation|test|benchmark|metric)", re.IGNORECASE), "model": re.compile(r"(model|network|backbone|encoder|decoder|head|adapter|lora|loss)", re.IGNORECASE), "config": re.compile(r"(config|configs)", re.IGNORECASE), } TASK_KEYWORDS = { "classification": ("class", "imagenet", "log_regression", "linear", "knn"), "segmentation": ("seg", "segment", "mask", "ade20k", "m2f", "mask2former"), "detection": ("det", "detect", "coco", "detr", "box"), "depth": ("depth", "nyu", "dpt", "depther"), "text": ("text", "clip", "token", "dinotxt"), "pretrain": ("ssl", "pretrain", "teacher", "student", "distillation", "gram"), } OUTPUT_HINTS = ("checkpoint", "results", "metrics", "tensorboard", "events", "log", "output") SKIP_PARTS = { "tmp", "artifacts", "repro_outputs", "train_outputs", "analysis_outputs", "debug_outputs", "explore_outputs", "__pycache__", ".git", ".claude", ".codex", } COMMON_FOCUS_TOKENS = {"py", "yaml", "yml", "json", "toml", "ini", "md", "run", "train", "eval", "config", "configs"} def load_context(path: Optional[str]) -> Dict[str, Any]: if not path: return {} context_path = Path(path).resolve() text = context_path.read_text(encoding="utf-8-sig") if context_path.suffix.lower() == ".json": return json.loads(text) try: import yaml # type: ignore except ImportError as exc: raise ValueError(f"YAML analysis context requires PyYAML: {context_path}") from exc payload = yaml.safe_load(text) return payload if isinstance(payload, dict) else {} def normalize_task_family(value: Any) -> Optional[str]: text = str(value or "").strip().lower() return text or None def normalize_scalar_string(value: Any) -> str: if isinstance(value, dict): name = value.get("name") if name: return str(name) return json.dumps(value, ensure_ascii=False) return str(value or "") def metric_goal(value: Any) -> str: text = str(value or "maximize").strip().lower() if text in {"min", "minimize", "lower", "lower_is_better"}: return "minimize" return "maximize" def first_existing(root: Path, names: Iterable[str]) -> Optional[Path]: for name in names: candidate = root / name if candidate.exists(): return candidate return None def command_paths(command: str) -> List[str]: paths: List[str] = [] for token in re.findall(r"[\w./\\-]+\.(?:py|ya?ml|json|toml|ini|csv|pth|pt)", command): token = token.strip().strip("\"