from-scratch

Learn how something truly works by building a minimal runnable implementation from scratch in a step-by-step (Karpathy-style) way. Each step asks the user to predict the outcome before executing. Suited for ML/AI concepts (e.g., attention, tokenizers, backpropagation, RAG, agents), systems (e.g., databases, HTTP servers, Git, shell), and any code-implementable topic. Use when users say “teach me how X works,” “build X from scratch,” “I want to truly understand X,” or “implement X without libraries.”

Last repository push
GitHub Stars
589
Forks
48
Issues / PRs
0

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "from-scratch" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-fdc2fdd70ba3aa2be749128d9f616e72198c3714e8c75113dc3a4df343dc5f90. Verify the upstream source and version against https://github.com/dotslashsimran/simcraft before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

github.com

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

Learn how something truly works by building a minimal runnable implementation from scratch in a step-by-step (Karpathy-style) way. Each step asks the user to predict the outcome before executing. Suited for ML/AI concepts (e.g., attention, tokenizers, backpropagation, RAG, agents), systems (e.g., databases, HTTP servers, Git, shell), and any code-implementable topic. Use when users say “teach me how X works,” “build X from scratch,” “I want to truly understand X,” or “implement X without libraries.”

0 Downloads

Introduction source: third_party · dotslashsimran · 0.0.1 Reference

SkillPi interpretation

Tasks
Learn how something really works by building the smallest working version of it from scratch, Karpathy style, one small step at a time, with the user predicting what each step will do before running it. Works for ML and AI ideas (attention, tokenizers, backprop, RAG, agents), systems (a database, an HTTP server, git, a shell) and anything else that can be coded. Use when the user says "teach me how X works", "build X from scratch", "I want to really understand X", "explain X from first principles", or "implement X without the library".
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: from-scratch
description: Learn how something really works by building the smallest working version of it from scratch, Karpathy style, one small step at a time, with the user predicting what each step will do before running it. Works for ML and AI ideas (attention, tokenizers, backprop, RAG, agents), systems (a database, an HTTP server, git, a shell) and anything else that can be coded. Use when the user says "teach me how X works", "build X from scratch", "I want to really understand X", "explain X from first principles", or "implement X without the library".

From scratch

Reading about a thing gives you the words. Building it gives you the understanding. The fastest way to really get attention, a tokenizer, a vector database or git is to write the smallest version that works, in plain code, and watch it run.

The goal is understanding, not a finished library. Small and readable beats complete.

1. Find the core

Ask one question first: what does the user already know? (For example: "Comfortable with Python and numpy? Seen matrix multiplication before?") Then name, in one or two sentences, the one mechanism that makes the thing work. Examples:

  • Attention: every token scores every other token, and takes a weighted average of their values.
  • Git: files are stored by the hash of their contents, and a commit is a file that points at a tree and a parent.
  • RAG: turn text into vectors, find the nearest ones to the question, paste them into the prompt.

Everything that isn't the core (speed, edge cases, config, error handling) is left out on purpose. Say what's left out and why.

2. Plan the build

Break it into 4 to 8 steps. Each step adds one idea and ends with something that runs and prints a result. Target the whole thing at under 200 lines, one file, standard library or numpy only unless the idea needs more. Show the step list, then start step 1.

3. Each step

  1. Say the idea in two or three plain sentences.
  2. Ask for a prediction before running anything: "What do you think this prints?" or "Which word will get the highest score?" Wrong guesses are where the learning happens, so wait for one.
  3. Write the code for that step only. Short functions, honest variable names, a comment only where the why isn't obvious.
  4. Run it and show the real output. Use tiny inputs (3 tokens, 2 files, a 4-word vocabulary) so every number can be checked by eye.
  5. Compare with the prediction. If it was wrong, explain what they missed, in one or two sentences.

Never write two steps at once. The user can say "faster" to combine steps.

4. Check against the real thing

When the toy works, run the same input through the real library or tool (PyTorch attention, real git, a real tokenizer) and show that the answers match, or explain exactly why they differ. This is what turns "I made a toy" into "I know how it works".

5. Lock it in

End with:

  • A one-paragraph explanation in the user's words: ask them to explain it back first, then tidy what they wrote rather than replacing it.
  • Three questions that test the core idea, answers hidden until they try. (The teach-back skill can take it from here.)
  • Where the real version is more complicated, as a short list, so they know what they skipped.

Keep the code file. It's their reference implementation.

Rules

  • Never paste a big finished implementation. The steps are the lesson.
  • No magic: if a line uses something they haven't seen, either explain it in one sentence or replace it with something simpler.
  • Run every line of code you show. Never show output you didn't get.

Current listing version

0.0.1

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value92/100

Highlights

  • 提供高效的学习方法论,帮助用户通过动手实践深入理解复杂概念
  • 适用于机器学习、系统原理等多个高价值领域,实用性强
Trigger Precision95/100

Highlights

  • 触发词覆盖全面,精准匹配用户学习意图
  • 边界清晰,有效区分同类 Skill
Structure and Standards90/100

Areas to improve

  • 缺少显式 'When to Use' 章节 Reported severity: Minor

    文档结构完整,但未使用 'When to Use' 作为显式章节标题

    Recommendation: 建议在正文中添加 'When to Use' 章节以提升规范性

Highlights

  • 阶段划分清晰,执行流程明确
  • 包含端到端示例和验证机制
Execution Reliability88/100

Highlights

  • 强调使用标准库,降低依赖风险
  • 每一步都要求运行验证,确保可执行性
  • 包含与真实工具的对比验证,增强学习效果
Evidence Verifiability (mean of the first four)91/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

These common operations were not identified in the main document. This does not mean no permissions or risks exist.

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.