by SaladDay
600 行 TypeScript 写成的超级迷你版 pi,让你轻松从 0 写出属于你的 pi-agent
# Add to your Claude Code skills
git clone https://github.com/SaladDay/pi-from-scratchGuides for using ai agents skills like pi-from-scratch.
Last scanned: 8/10/2026
{
"issues": [
{
"type": "npm-audit",
"message": "@vitest/mocker: Vulnerability found",
"severity": "medium"
},
{
"type": "npm-audit",
"message": "esbuild: esbuild enables any website to send any requests to the development server and read the response",
"severity": "medium"
},
{
"type": "npm-audit",
"message": "vite: Vite Vulnerable to Path Traversal in Optimized Deps `.map` Handling",
"severity": "high"
},
{
"type": "npm-audit",
"message": "vite-node: Vulnerability found",
"severity": "medium"
},
{
"type": "npm-audit",
"message": "vitest: Vulnerability found",
"severity": "critical"
}
],
"status": "FAILED",
"scannedAt": "2026-08-10T05:25:28.056Z",
"npmAuditRan": true,
"pipAuditRan": true,
"promptInjectionRan": true
}See how pi-from-scratch compares with popular alternatives.
pi-from-scratch is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by SaladDay. 600 行 TypeScript 写成的超级迷你版 pi,让你轻松从 0 写出属于你的 pi-agent. It has 1,197 GitHub stars.
pi-from-scratch failed SkillsLLM's automated security scan, which flagged one or more high-severity issues. Review the Security Report section carefully before using it.
Clone the repository with "git clone https://github.com/SaladDay/pi-from-scratch" and add it to your Claude Code skills directory (see the Installation section above).
pi-from-scratch is primarily written in TypeScript. It is open-source under SaladDay on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh pi-from-scratch against similar tools.
No comments yet. Be the first to share your thoughts!
Based on votes and bookmarks from developers who liked this skill
Requires a passing catalog security scan. Resolve the flagged issues and resubmit to enable featuring.
⚠️ Third-Party Software Notice
This skill is third-party open-source software developed and hosted independently on GitHub. SkillsLLM is an informational directory and does not control or maintain the underlying repository.
Any security checks, ratings, or warnings displayed by SkillsLLM are automated and limited in scope. They do not constitute a security certification or guarantee that the software is safe, error-free, or free from malicious code, vulnerabilities, compromised dependencies, or prompt-injection risks.
Review the source code, permissions, dependencies, and configuration before installing or running any third-party skill. Use is at your own risk. To the maximum extent permitted by applicable law, SkillsLLM is not liable for losses arising from third-party software.
See comparison
从零手写一个能读文件、改代码、执行命令的 TypeScript coding agent。
项目沿着 pi 的数据流拆解,需要什么、我们造什么,所有组件都是符合直觉的。
删除 pi 的工程细节,留下 pi 的核心思想。
放轻松,这是一篇文章,不是一本书,你会很容易看懂。
网站把文章和源码放在一起。阅读推进时,右侧编辑器会逐步补全代码,当你看完的时候,nano-pi 的代码也会全部呈现在编辑器中。
同时设计了一个 Trace 跟踪,可以打断点逐行过代码,希望能帮助大家理解代码执行流。
文章保留古法手敲,尽可能没有ai味,希望大家读的开心。
需要 Node.js 22 或更高版本,以及一个 OpenAI 兼容 API。
npm install
export NANOPI_API_KEY=your-api-key
npm run dev
可选环境变量:
NANOPI_MODEL:模型名NANOPI_BASE_URL:OpenAI 兼容接口地址,默认 https://api.openai.com/v1线上 trace 是预先生成的静态数据,浏览网站不会发起模型请求。
cd web
npm install
npm run dev