Skip to content
Back to skills

Code Intake

ASecurity

code intake, scan scripts, analyze R scripts, register code, data dictionary from scripts, code to metadata, extract variables from code, scan my scripts, parse my R code, index my code, register my scripts

  • 3 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 23, 2026
ai-agentspythongo

Security analysis

A100/100

Scanned September 23, 2026

npx -y skills add SVerITG/Metis --skill code-intake --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Code Intake?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Code Intake
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/sveritg-code-intake/badge)](https://www.skillsdirectory.com/skills/sveritg-code-intake)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: Code Intake
description: "code intake, scan scripts, analyze R scripts, register code, data dictionary from scripts, code to metadata, extract variables from code, scan my scripts, parse my R code, index my code, register my scripts"
effort: normal
complexity: standard
---

## Purpose

Extract metadata from R and Python scripts without ever seeing the data. This is the "send code, not data" pipeline for projects: Metis reads the code (safe) to learn file paths, variables, and packages, generates tailored profiling scripts the user runs locally, and builds a per-project data dictionary — all without the AI ever touching any data.

The end goal: Metis can scaffold new scripts (dashboards, analyses, Table 1) using exact variable names, paths, and coding conventions from the project.

## The workflow (5 steps)

### Step 1 — Locate scripts

Ask the user where their scripts are. Default: `inputs/code/`. Accept any folder path.

```
scan_project_scripts(folder_path="<path>", project_id="<project>")
```

If the user hasn't specified a project, ask which project this belongs to (check `get_project_status()` for active projects).

### Step 2 — Present findings

Show the summary table from `scan_project_scripts`:
- Scripts found and analyzed
- Packages used
- Datasets detected (file reads)
- Variables extracted

Highlight anything interesting: missing packages, inconsistent naming, unusually large/small scripts. If `source()` dependencies are found, mention the dependency chain.

### Step 3 — Generate profiling scripts

For each detected dataset, offer to generate a safe profiling script:

```
generate_profiling_script(
  dataset_name="<name>",
  project_id="<project>",
  language="r",           # or "python"
  dataset_path="<path>"   # from the scan results
)
```

Explain clearly:
- The script runs on their machine
- Only aggregates are computed (no row-level data)
- Output is structured JSON ready for Metis to ingest

### Step 4 — Receive profiling output

When the user shares the JSON path after running the profiling script:

```
ingest_profiling_output(
  json_path="<path>",
  dataset_name="<name>",
  project_id="<project>"
)
```

Confirm: how many variables were registered, any anomalies (high missingness, inconsistent coding, unexpected types).

### Step 5 — Ready to scaffold

Confirm the data dictionary is registered. Offer next steps:
- `scaffold_script(goal="...", project_id="...", language="r")` — for new analyses
- `search_code_repository(query="...")` — to find existing patterns
- Suggest specific things they could build: "Table 1", "dashboard", "analysis pipeline"

## Safety contract

- **Never ask the user to paste data.** All data insight comes from running profiling scripts locally.
- **If the user shares raw data, stop.** Redirect them to `generate_profiling_script()`.
- **Only aggregates are acceptable:** variable names, types, unique counts, ranges, missingness percentages, value frequencies (capped at 30 levels).

## Collaboration

Software Engineer (code analysis) + Data Guardian (safety gate) + Data Analyst (profiling) + Methods Coach (if variables suggest a statistical context).

## Recording

After the workflow:
```
log_agent_run(agent_slug="software-engineer", task_summary="Code intake: scanned N scripts, registered M variables for project X")
write_reflexion(session_id="...", agent_slug="software-engineer", went_well="...", could_improve="...", missing_context="...", tool_wishes="...")
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.