Skip to content

Repository files navigation

LearnFromCode

v1 — Portable Agent Skill that turns any repository into a local interactive HTML learning workbook, then adapts the course when you run checkpoint commands in chat.

Works with Cursor, Claude Code, and any agent that can load a SKILL.md and read/write files. The page never calls an LLM.

Workbook (browser)  ↔  files under .learn-from-code/  ↔  skill in agent chat

Quick start (this repo)

node .agents/skills/learn-from-code/scripts/init-workspace.mjs --repo "$(pwd)"
node .agents/skills/learn-from-code/scripts/serve.mjs --repo "$(pwd)"
  1. Open http://127.0.0.1:8765 and fill the knowledge form.
  2. In your agent chat say learn-from-code start (generates modules).
  3. Study → checkpoint dialog → learn-from-code check.

Install into another repo

Copy or symlink the skill folder (single source of truth):

# Recommended: portable path (Cursor + Agent Skills clients)
mkdir -p path/to/repo/.agents/skills
cp -R .agents/skills/learn-from-code path/to/repo/.agents/skills/

# Claude Code discovery
mkdir -p path/to/repo/.claude/skills
ln -s ../../.agents/skills/learn-from-code path/to/repo/.claude/skills/learn-from-code

# Optional: Cursor also reads .cursor/skills/ — symlink if you prefer that layout
mkdir -p path/to/repo/.cursor/skills
ln -s ../../.agents/skills/learn-from-code path/to/repo/.cursor/skills/learn-from-code

Personal (all projects):

Host Path
Cursor / Agent Skills ~/.agents/skills/learn-from-code/ or ~/.cursor/skills/learn-from-code/
Claude Code ~/.claude/skills/learn-from-code/

Requires Node.js 18+ (no npm install — scripts are plain Node).

Commands

Say in chat What happens
learn-from-code start Analyze repo, ensure UI, generate/resume course
learn-from-code check Read progress → adapt next modules
learn-from-code focus <topic> Steer adaptation to a topic
learn-from-code status Summarize profile and progress

Layout

.agents/skills/learn-from-code/   # skill package (edit here)
  SKILL.md
  references/
  templates/ui/
  scripts/                        # init, fingerprint, validate, serve
.cursor/skills/learn-from-code →  # symlink
.claude/skills/learn-from-code →  # symlink
AGENTS.md                         # cross-agent project instructions
CLAUDE.md → AGENTS.md
.learn-from-code/                 # generated (gitignored)

Docs

License

MIT — see LICENSE.

About

Portable agent skill: turn any repo into a local HTML learning workbook, adapted via chat checkpoints (Cursor, Claude Code, …).

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages