AGENT SKILL

ag-second-brain

Use when querying, searching, updating, or adding notes in the Obsidian second brain without fabricating details.

License 许可
MIT
最近更新
2026-08-02
Stars
★ 0
Forks
0

01 前言 Front Matter

name
ag-second-brain
layer
helper
description
Use when querying, searching, updating, or adding notes in the Obsidian second brain without fabricating details.
trigger_keywords
second, brain

02 资源文件 1

03 SKILL.md 正文

Second Brain QA & Explainer Skill

This skill allows the agent to search the local Obsidian second brain using a dedicated script, extract matching notes, and answer user queries with absolute accuracy by citing specific local notes as sources.

When to Apply

  • The user asks for an explanation, summary, or definition of any technical concept, SOP, workflow, or vocabulary term.
  • You need to verify if a specific topic or rule is documented in the second brain before answering.
  • The user explicitly requests searching, updating, adding knowledge, or ducing drafts/inbox notes.
  • The user wants to clean up the inbox or migrate raw notes into structured Atomic Notes.

How to Use

To query the second brain for a specific topic, execute the search script:

bun /home/ngxc/workspace/agent-skills-kit/.agents/skills/ag-second-brain/scripts/search_brain.mjs "<query>"

Knowledge Modification & Creation Guidelines

  1. Search Before Edit: Run the search script to check if the concept already exists. Avoid creating duplicate notes for the same concept.
  2. Updating Existing Notes:
    • Maintain the strict 5-part structure (Frontmatter, TL;DR, Core Concept, Concrete Examples, Related Notes).
    • Run bun 99_Meta/Scripts/validate_notes.mjs <file_path> after editing.
  3. Creating Inbox Notes:
    • Save temporary drafts or raw incoming notes directly to 00_Inbox/<filename>.md. These do not require strict frontmatter or section templates initially.
  4. Migrating Inbox to Atomic Notes:
    • Read the raw note from 00_Inbox/.
    • Apply the Litmus Test: If actionable (SOP, scripts, guidelines), place in 30_Resources/Methods/. If cognitive (theory, definitions), place in 30_Resources/Concepts/ or 30_Resources/Tech/.
    • Structure the note into the 5-part Atomic Note format.
    • Add backlinks to relevant MOCs (000_Tech_MOC, 000_Concepts_MOC, or 000_Methods_MOC) and register the link inside those MOC files.
    • Run validation script on the new file: bun 99_Meta/Scripts/validate_notes.mjs <new_file_path>.
    • Once successfully validated, delete the raw note from 00_Inbox/.
  5. Creating Workflow Documentation:
    • When creating or editing workflow docs in second-brain/Docs/<Topic>/, follow the SSOT Workflow Documentation Standard at process/development-protocols/references/workflow-documentation-standard.md (via ag-docs skill design mode).
    • Use docType: feature-workflow or docType: infrastructure-workflow.
    • Use PascalCase with Underscores file naming: PascalCase_With_Underscores_Workflow.md (e.g., Register_User_Workflow.md).
    • Use Codebase Memory MCP graph tools (search_graph, trace_path, get_code_snippet) to extract grounded code symbols and avoid hallucinated routes or DTOs.
  6. Flashcard Creation & SRS Guidelines:
    • Directory Structure: Store flashcard files under 50_Flashcards/<DeckName>/ (e.g., 50_Flashcards/Backend/ or 50_Flashcards/Vocabulary/CV/). Yanki automatically derives the Anki deck name from the folder path.
    • File Format Constraints:
      • Frontmatter: Omit standard atomic note tags to skip standard validation. Keep only the noteId in the YAML block (e.g., --- \n noteId: 12345 \n ---) to preserve Anki's review history and avoid duplicate cards.
      • No Headings: Never write # Title headings in the body of the markdown, as Yanki renders headings into the Anki card content.
      • Separator Spacing: The thematic break --- separating front and back content must be surrounded by an empty line both above and below it.
    • Supported Yanki Card Syntax:
      • Basic:
        Front content
        
        ---
        
        Back content
        
      • Reversed with Extra: Use a double --- to create a reversible card (twice the cards). A third --- defines an "Extra" section visible on the back of both generated cards:
        Term / Concept A
        
        ---
        
        ---
        
        Definition / Concept B
        
        ---
        
        Extra context shown on both sides
        
      • Cloze Deletion: Hide terms with double tildes ~~, adding optional _italics_ inside for hints:
        All will be ~~revealed _hint text_~~.
        
      • Advanced Cloze Numbering: Group clozes to reveal simultaneously by adding a number inside the cloze:
        ~~1 Grouped A~~ and ~~1 Grouped B~~.
        
      • Type-in-the-Answer: Emphasize the last line with _italics_ to force a spelling text-input check in Anki:
        Spell the term:
        
        _spelling_
        

Response Guidelines

  1. Exact Extraction: Read the source note paths returned by the script and use their content (like ## TL;DR or Core Concept) to answer.
  2. Mandatory Citations: Always reference the source note path or link (e.g., [[Note_Name]] or 30_Resources/Concepts/Path/Note_Name.md) at the end of your explanation.
  3. No Fabrication: If the script returns NO_MATCHES_FOUND or if the matching notes do not contain the answer, you MUST explicitly state: "Kiến thức này không có trong second-brain." Do not guess, hallucinate, or use external/pretrained LLM knowledge to answer the query.

References

04 同仓库更多 Skills

ngxccc
ngxccc/agent-skills-kit

zustand

Rules and standards for state management using Zustand in React and Next.js. Use when implementing client-side stores, persistence with localStorage, or preventing SSR hydration mismatch.

★ 0
ngxccc
ngxccc/agent-skills-kit

zod

Zod v4 schema validation best practices. Use when defining schemas, utilizing safeParse, or customizing error messages.

★ 0
ngxccc
ngxccc/agent-skills-kit

upstash-ratelimit

Rules, standards, and references for rate limiting in serverless environments using Upstash Ratelimit. Use when implementing rate limiting, configuring Upstash Redis, or handling request blocking.

★ 0
ngxccc
ngxccc/agent-skills-kit

ui-design

UI/UX and frontend design best practices guidelines (formerly frontend-design). This skill should be used when writing, reviewing, or designing frontend code to ensure accessibility, performance, and usability. Triggers on tasks involving HTML structure, CSS styling, responsive layouts, form design, animations, or accessibility improvements.

★ 0
ngxccc
ngxccc/agent-skills-kit

typescript

TypeScript performance, tsconfig, type errors, async patterns — triggered when the user asks to "optimize TypeScript performance", "speed up tsc compilation", "configure tsconfig.json", "fix type errors", "improve async patterns", or encounters TS errors (TS2322, TS2339, "is not assignable to"). Also triggers on .ts, .tsx, .d.ts file work involving type definitions, module organization, or memory management. Does NOT cover TypeScript basics, framework-specific patterns, or testing.

★ 0
ngxccc
ngxccc/agent-skills-kit

typescript-refactor

TypeScript and TSX refactoring and modernization guidelines from a principal specialist perspective, current to TypeScript 6.0 and React 19. This skill should be used when refactoring, reviewing, or modernizing TypeScript or React/TSX code for type safety, compiler performance, and idiomatic patterns. Triggers on tasks involving type architecture, narrowing, generics, discriminated unions, error handling, React component and hook typing, or migration to modern TypeScript features (satisfies, using, const type parameters, inferred type predicates, isolatedDeclarations, erasable syntax, import attributes).

★ 0