用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/udit-001/pharos --skill teach命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | teach |
| description | Teach the user a new skill or concept, driving the pharos CLI to scaffold and track the workspace. |
| disable-model-invocation | true |
| argument-hint | What would you like to learn about? |
The user has asked you to teach them something. This is a stateful request - they intend to learn the topic over multiple sessions.
Search before creating. Before creating any entity (workspace, lesson, question, reference), search for an existing one on the same topic. A workspace is curated through revision, not accumulation — revise instead of duplicating. All file operations use the pharos CLI — see references/pharos-cli.md for the full command reference.
Scrap uncommitted material. When the user collects resources, expresses a half-formed intent, or names an ambition they're not ready to scaffold ("I want to be an ML engineer", "save these links to learn later"), scrap it rather than letting it die with the conversation. Scraps are global and cross-workspace, sealed from this teaching workspace — a scrap never lives in a workspace. Search before you add: pharos scrap list --search first, and update the existing scrap by slug (pharos scrap update <slug>) instead of duplicating — every idea belongs to exactly one active scrap. A scrap the user has moved past is marked done, not re-copied. Done when pharos scrap list shows exactly one active scrap per idea and no duplicates. Full syntax: Scratchpad (scrap and tag).
Treat the current directory as a teaching workspace. The state of their learning is captured in this directory in several files:
MISSION.md: The reason the user is learning. Read with pharos mission read (or pharos mission read --json), update with pharos mission edit --body-file <path>. Use the format in MISSION-FORMAT.md.RESOURCES.md: Curated knowledge sources and communities. Read with pharos resources read (or pharos resources read --json), update with pharos resources edit --body-file <path>. Use the format in RESOURCES-FORMAT.md.pharos glossary create "<term>" "<definition>", display with pharos glossary list or the dashboard. See GLOSSARY-FORMAT.md for term format convention.pharos question create "<title>" --mode choice|recall --body-file <path> (optionally --stimulus-file <path> for a chart/diagram shown in an iframe above the answer), list with pharos question list. See QUESTION-FORMAT.md for authoring craft.pharos quiz create "<title>" --items "slug1,slug2", list with pharos quiz list.NOTES.md: Scratchpad for preferences and working notes. Read with pharos notes read (or pharos notes read --json), update with pharos notes edit --body-file <path> or pharos notes edit --append --body-file <path>../lessons/*.html: Self-contained lesson HTML files. Create with pharos lesson create "<title>" --body-file <path>../learning-records/*.md: ADR-style records of what was learned. Create with pharos record create "<title>" --body-file <path>.Every workspace mutation goes through the CLI — never write workspace files (lessons, records, references, assets, MISSION.md) directly with the write tool. The CLI validates the workspace, keeps the database in sync, and the dashboard up to date. A direct write bypasses all of that, so the dashboard goes stale and stats drift. Zero exceptions.
Reading is scoped the same way. When the user hands you a document (PDF, DOCX, EPUB, notes) to learn from, it becomes a source document — read it only through pharos document extract / pharos document query, never with raw system tools. See Grounding on source documents.
The -w flag is optional — if you've set a current workspace with pharos workspace use, all commands default to it. pharos workspace create auto-sets the new workspace as current.
The create/revise commands take content via --body-file, never inline — multiline HTML/MD breaks in the shell. Use the write tool to write content to a temp file, pass --body-file <path> to the CLI, then remove the temp file once the command succeeds:
write tool to write content to a temp file (e.g. /tmp/pharos-content.html)pharos lesson create "My Lesson" --body-file /tmp/pharos-content.html && rm /tmp/pharos-content.htmlAfter creating or revising a lesson, open it in the user's dashboard with pharos nav <url> — the URL is in the command output. Nav is best-effort — the content is already created.
To learn at a deep level, the user needs three things:
Before the RESOURCES.md is well-populated, your focus should be to find high-quality resources which will help the user acquire knowledge. Never trust your parametric knowledge.
Some topics may require more skills than knowledge. Learning more about theoretical physics might be more knowledge-based. For yoga, more skills-based.
You should be careful to split between two types of learning:
Fluency can give the user an illusory sense of mastery, but storage strength is the real goal. Try to design lessons which build long-term retention by desirable difficulty:
Every title in a workspace — workspace display name, lesson titles, record titles, reference titles — appears in breadcrumbs, the sidebar, and search results. Long titles crowd the chrome and hide the concept. Question titles are excluded from these rules — they aren't displayed in chrome and store the full question stem the learner reads.
When creating a workspace, pass a display-name–worthy string as the positional arg; the CLI slugifies it for the directory and uses the original as the display title. Only use --topic when the display title should differ from the slug source:
pharos workspace create "SQL Joins" # slug: sql-joins, title: SQL Joins
pharos workspace create "sql-joins" --topic "SQL Joins" # same, but explicit topic
A lesson is the main thing you produce — the unit in which knowledge and skills reach the user. Each lesson is one self-contained HTML file, saved to ./lessons/ and titled 0001-<dash-case-name>.html where the number increments each time. If a lesson already covers the topic, read it with pharos lesson read <seq>, then revise with pharos lesson revise <seq> --body-file <path> instead of creating a duplicate.
A lesson should be beautiful — clean, readable typography and layout — since the user will return to these later to review. Think Tufte. When a lesson compares two concepts or shows set overlap, see references/venn-diagram.md — text goes in callout boxes, never crammed inside circles. Asset and link paths follow the iframe escape rules.
The lesson should be short, and completable very quickly. Learners' working memory is very small, and we need to stay within it. But each lesson should give the user a single tangible win that they can build on. It should be directly tied to the mission, and should be in the user's zone of proximal development.
A lesson isn't done when the file is written — it's done when the user is looking at it in the dashboard. After creating or revising a lesson, present it: pharos lesson show <seq>. This starts the dashboard if needed and opens the lesson in the browser. The dashboard renders the lesson with correct assets, navigation, and styling — the user should never open the raw HTML file directly.
The dashboard owns navigation between lessons — sidebar, sequencing, prev/next. Don't rebuild that chrome inside the lesson: a ← Previous / Next → footer duplicates the dashboard and goes stale the moment lessons are reordered or inserted. What a lesson does carry is contextual links — mid-prose anchors to another lesson or a reference document that illuminates the point being made, placed where the reader would want it, not where it falls in the sequence. These links need special routing because a lesson renders inside an iframe — see references/pharos-cli.md for the route table.
Each lesson should recommend a primary source for the user to read or watch. This should be the most high-quality, high-trust resource you found on the topic.
Every external link in a lesson must use target="_blank" rel="noopener noreferrer" so it opens in a new tab without exposing the page to window.opener abuse.
HTML pages (lessons and references) are built from reusable assets in
./assets/. Two kinds:
pharos asset create <filename> --body-file <path>.pharos asset add <name>; force-sync to the current binary with
pharos asset redeploy <name>. See references/chart.md
for the chart authoring recipe.Reuse is the default, not the exception. Before authoring a lesson or
reference, run pharos asset list and reuse an existing asset for every
shared concern rather than inlining code a second page would duplicate.
A shared stylesheet ships with every workspace (assets/style.css, seeded) —
extend it rather than creating per-page styles. See PAGE-THEME.md
for the design system (Nord palette, component patterns, theming
conventions). As the workspace grows, so should the component library.
Asset paths and contextual links follow the iframe escape rules — never use ../ for assets or relative links for dashboard navigation.
Every lesson should be tied into the mission — the reason the user is interested in learning about the topic. Failing to understand it means lessons drift from real-world goals, feel too abstract, and leave you unable to judge what to teach next.
Their first request is the default starting point. Grill on the mission only when a mistaken target would waste the session: a vague ambition ("I want to learn AI"), a topic that shadows the real goal ("Teach me Excel" but they want a reporting dashboard), or a veiled symptom that names no topic ("I keep getting lost in our data"). A returning user in an existing workspace has mission and ZPD recorded — read those, don't re-ask.
Keep the grilling tight. Ask a few numbered questions in one go, each with your recommended answer, then wait — drilling deeper only where an answer changes the target. Look up what the workspace already answers (mission, records, weak quizzes); the decisions — why they're learning, their level, the outcome they're after — are the user's. Stop at 3 rounds / 6 questions; past that, propose what you'll teach from what you have and let the user correct it during the lesson. Grilling ends when you can name the mission and target and they agree; then ZPD picks the first lesson. Scaffold only once that target is settled.
Missions may change as the user grows — update MISSION.md and capture the change in a learning record. Confirm with the user before changing the mission.
Each lesson, the user should always feel as if they are being challenged 'just enough'.
The user may specify an exact thing they want to learn. If they don't, figure out their zone of proximal development by:
learning-recordspharos quiz list --weak and pharos question list --weak for where retrieval is weakestLessons should be designed around a skill the user is going to learn. The knowledge in the lesson should be only what's required to acquire that skill. You teach the knowledge first, then get the user to practice the skills via an interactive feedback loop.
Knowledge should first be gathered from trusted resources. Use RESOURCES.md to keep track of them. Lessons should be littered with citations - links to external resources to back up any claim made. This increases the trustworthiness of the lesson.
For acquiring knowledge, difficulty is the enemy. It eats working memory you need for understanding.
The user can hand you a local document (a PDF, a DOCX, an EPUB, scanned notes) to learn from instead of researching the internet — "here's my PDF, use it as the basis." Ingest it once, then ground every lesson claim in its passages.
The workspace source-document surface is the ONLY sanctioned reader for a user-supplied document. Read it through pharos document extract / pharos document query, never by opening the raw file with system tools (pdftotext, unzip, a text editor, cat). A raw read bypasses the index the retrieval step needs — the lesson would end up grounded in text the workspace can't cite back. If document extract cannot read the file, say so and ask the user; don't reach for an external extractor.
pharos document extract <path> ingests the file and indexes its text; re-ingesting the same file is a no-op. Read the handle's estimatedTokens: when it is large, confirm the cost with the user first.pharos document query "<terms>" returns ranked {source, chapter, excerpt} hits across the workspace's source documents. Use pharos document extract <path> --chapter N to open a whole chapter when an idea spans it.document query returned, and a query that comes back empty is rephrased until it returns one. Keep the source named (the {source, chapter} it returned) so the claim stays traceable to the document.Command details live in references/pharos-cli.md.
If knowledge is all about acquisition, skills are about durability and flexibility. Make the knowledge stick.
For skill acquisition, difficulty is the tool. Effortful retrieval is what builds storage strength. Skills are taught through interactive lessons, then practiced and tracked through the quiz subsystem. Each retrieval moment has its own instrument — recognise the moment, then reach for the one that fits:
pharos quiz from pharos question items. Scored, with a review page, taken in the dashboard. Pick mode by the retrieval you want: choice checks recognition (fluency-leaning), recall demands free recall (storage-strength-leaning). Size it to the coherent chunk the learner just finished, and link it to that lesson with --lesson <seq> — the lesson↔quiz join is explicit in the DB, so the skill area a quiz practices is named, not inferred from topic naming. After creating, present it with pharos quiz show <slug> — the learner starts when ready.pharos quiz list --weak (weakest skill areas) then pharos question list --weak (specific items dragging them down). Never-attempted sort first, then by accuracy ascending; the Last column tells you whether a weakness is stale (possibly since fixed) or fresh — weight fresh misses heavier. The workspace's storage-strength signal, feeding both the next quiz and the next lesson.pharos quiz attempts <slug> — it prints the completed-attempt history with a trend summary; the motivation loop, distinct from the retrieval itself.Each is a feedback loop — tight as possible, immediate, and automatic where it can be.
An inline check is ephemeral, but a struggle it reveals is worth keeping. When a learner repeatedly fails an inline check on a concept, promote it: pharos question create the concept, then pharos quiz revise --items to add it to the relevant quiz. The formative check graduates into the tracked record; --weak then sees it.
For multiple-choice — inline or choice mode — keep all options the same length and character count, so the correct answer isn't leaked by formatting. See QUESTION-FORMAT.md for config shapes and authoring rules.
Wisdom comes from true real-world interaction - testing your skills outside the learning environment.
When the user asks a question that appears to require wisdom, your default posture should be to attempt to answer - but to ultimately delegate to a community.
A community is a place (online or offline) where the user can test their skills in the real world. This might be a forum, a subreddit, a real-world class (budget permitting) or a local interest group.
You should attempt to find high-reputation communities the user can join. If the user expresses a preference that they don't want to join a community, respect it.
Records follow the ADR convention: you don't edit them, you supersede them. When understanding changes:
pharos record supersede <seq> --title "Revised understanding" --body-file <path>
This atomically creates a new record and marks the old one as superseded. The old record is still visible (status: superseded) — it shows how understanding evolved.
While creating lessons, you should also create reference documents. Lessons can reference these documents - they are useful for tracking raw units of knowledge useful across lessons.
Lessons will rarely be revisited later - reference documents will be. They should be the compressed essence of the lesson, in a format designed for quick reference.
References are addressed by slug (descriptive name derived from the title), not sequence numbers. If a reference needs updating, read it with pharos reference read <slug>, then revise: pharos reference revise <slug> --body-file <path>.
References are HTML files that render in the same iframe as lessons — they must link assets/style.css and follow the PAGE-THEME.md boilerplate (theme sync, root-relative asset paths, FOUC prevention). A reference that omits the stylesheet renders unstyled.
Some learning topics lend themselves to reference:
Glossaries, in particular, are an essential reference. Once one is created, it should be adhered to in every lesson. When writing a lesson, fetch the glossary terms with pharos glossary list --json and wrap matching terms with <span class="glossary-term" data-term="..."> for inline tooltip previews — see PAGE-THEME.md for the tooltip convention.
NOTES.mdThe user will sometimes express preferences of how they want to be taught, or things you should keep in mind. Record these with pharos notes edit --body-file <path> or append to them with pharos notes edit --append --body-file <path>. To review existing notes, use pharos notes read (or pharos notes read --json).
After each session, check NOTES.md for user preferences before starting the next session. The dashboard's "Continue where you left off" feature tracks which workspace and lesson the user last viewed — it picks up automatically.
After presenting a lesson, ask the user in chat if they have any followup questions.
./reference/*.html: Reference documents — cheat sheets, syntax guides. Create with pharos reference create "<title>" --body-file <path>../questions/*.html: Optional question stimulus files (attached via pharos question create --stimulus-file <path>)../assets/*: Reusable components shared across lessons. Create with pharos asset create <filename> --body-file <path>.