[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6F88K87ENEW3C33VQYM59P8":3,"skill-same:01M6F88K87ENEW3C33VQYM59P8":81},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":49,"linkOnly":50,"markdownContent":51,"markdownBody":52,"frontMatter":53,"refName":58,"commitSha":59,"skillDirectory":60,"forksCount":61,"repositoryHtmlUrl":62,"repositoryHomepageUrl":6,"ownerHtmlUrl":63,"ownerBlogUrl":64,"ownerDescription":65,"updatedAt":66,"install":67,"resources":80},"01M6F88K87ENEW3C33VQYM59P8","obsidian-core-workflow-a",null,"Execute Obsidian primary workflow: note manipulation and vault operations.\nUse when implementing file operations, frontmatter handling,\nor programmatic note creation and modification.\nTrigger with phrases like \"obsidian vault operations\",\n\"obsidian file manipulation\", \"obsidian note management\".","Dicklesworthstone\u002Fpi_agent_rust","Dicklesworthstone","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F35050222?v=4","01M6CG26AR942CSVMN1M5E3DSE","Jeff Emanuel","01M6CG26EPP71PSHW1VDS71121",1992,"MIT","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Fplugins-community\u002Fplugins\u002Fsaas-packs\u002Fobsidian-pack\u002Fskills\u002Fobsidian-core-workflow-a\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48],"workflow","core","obsidian","obsidian core workflow a","when","note management","frontmatter","implementing","programmatic","with","trigger","io","creation","use","operations","file operations","edit","write","read","grep","Bash","obsidian vault","vault","file","npm","2026-11-10 10:12:30",false,"---\nname: obsidian-core-workflow-a\ndescription: |\n  Execute Obsidian primary workflow: note manipulation and vault operations.\n  Use when implementing file operations, frontmatter handling,\n  or programmatic note creation and modification.\n  Trigger with phrases like \"obsidian vault operations\",\n  \"obsidian file manipulation\", \"obsidian note management\".\nallowed-tools: Read, Write, Edit, Bash(npm:*), Grep\nversion: 1.0.0\nlicense: MIT\nauthor: Jeremy Longshore \u003Cjeremy@intentsolutions.io>\n---\n\n# Obsidian Core Workflow A: Vault Operations\n\n## Overview\nPrimary workflow for Obsidian plugin development: manipulating notes, handling frontmatter, and working with the vault file system.\n\n## Prerequisites\n- Completed `obsidian-install-auth` setup\n- Understanding of Obsidian's file structure\n- Valid development vault configured\n\n## Instructions\n\n### Step 1: Working with Files (TFile)\n```typescript\nimport { TFile, TFolder, TAbstractFile, Vault } from 'obsidian';\n\nexport class FileOperations {\n  constructor(private vault: Vault) {}\n\n  \u002F\u002F Get all markdown files\n  getAllNotes(): TFile[] {\n    return this.vault.getMarkdownFiles();\n  }\n\n  \u002F\u002F Get file by path\n  getNote(path: string): TFile | null {\n    const file = this.vault.getAbstractFileByPath(path);\n    return file instanceof TFile ? file : null;\n  }\n\n  \u002F\u002F Read file content\n  async readNote(file: TFile): Promise\u003Cstring> {\n    return this.vault.read(file);\n  }\n\n  \u002F\u002F Read file content as cached (faster, may be stale)\n  readNoteCached(file: TFile): string | null {\n    return this.vault.cachedRead(file);\n  }\n\n  \u002F\u002F Modify file content\n  async writeNote(file: TFile, content: string): Promise\u003Cvoid> {\n    await this.vault.modify(file, content);\n  }\n\n  \u002F\u002F Create new note\n  async createNote(path: string, content: string): Promise\u003CTFile> {\n    \u002F\u002F Ensure parent folder exists\n    const folderPath = path.substring(0, path.lastIndexOf('\u002F'));\n    if (folderPath) {\n      await this.ensureFolder(folderPath);\n    }\n    return this.vault.create(path, content);\n  }\n\n  \u002F\u002F Delete note\n  async deleteNote(file: TFile, trash: boolean = true): Promise\u003Cvoid> {\n    if (trash) {\n      await this.vault.trash(file, false); \u002F\u002F Move to system trash\n    } else {\n      await this.vault.delete(file);\n    }\n  }\n\n  \u002F\u002F Rename\u002Fmove note\n  async renameNote(file: TFile, newPath: string): Promise\u003Cvoid> {\n    await this.vault.rename(file, newPath);\n  }\n\n  \u002F\u002F Ensure folder exists\n  private async ensureFolder(path: string): Promise\u003Cvoid> {\n    const folder = this.vault.getAbstractFileByPath(path);\n    if (!folder) {\n      await this.vault.createFolder(path);\n    }\n  }\n}\n```\n\n### Step 2: Frontmatter Operations\n```typescript\nimport { App, TFile, parseYaml, stringifyYaml } from 'obsidian';\n\nexport class FrontmatterService {\n  constructor(private app: App) {}\n\n  \u002F\u002F Extract frontmatter from note\n  getFrontmatter(file: TFile): Record\u003Cstring, any> | null {\n    const cache = this.app.metadataCache.getFileCache(file);\n    return cache?.frontmatter || null;\n  }\n\n  \u002F\u002F Parse frontmatter from content\n  parseFrontmatter(content: string): { frontmatter: Record\u003Cstring, any> | null; body: string } {\n    const match = content.match(\u002F^---\\n([\\s\\S]*?)\\n---\\n([\\s\\S]*)$\u002F);\n    if (!match) {\n      return { frontmatter: null, body: content };\n    }\n\n    try {\n      const frontmatter = parseYaml(match[1]);\n      return { frontmatter, body: match[2] };\n    } catch {\n      return { frontmatter: null, body: content };\n    }\n  }\n\n  \u002F\u002F Update frontmatter in file\n  async updateFrontmatter(\n    file: TFile,\n    updates: Record\u003Cstring, any>\n  ): Promise\u003Cvoid> {\n    const content = await this.app.vault.read(file);\n    const { frontmatter, body } = this.parseFrontmatter(content);\n\n    const newFrontmatter = { ...frontmatter, ...updates };\n    const yamlContent = stringifyYaml(newFrontmatter);\n    const newContent = `---\\n${yamlContent}---\\n${body}`;\n\n    await this.app.vault.modify(file, newContent);\n  }\n\n  \u002F\u002F Remove frontmatter property\n  async removeFrontmatterProperty(file: TFile, key: string): Promise\u003Cvoid> {\n    const content = await this.app.vault.read(file);\n    const { frontmatter, body } = this.parseFrontmatter(content);\n\n    if (frontmatter && key in frontmatter) {\n      delete frontmatter[key];\n      const yamlContent = stringifyYaml(frontmatter);\n      const newContent = `---\\n${yamlContent}---\\n${body}`;\n      await this.app.vault.modify(file, newContent);\n    }\n  }\n\n  \u002F\u002F Get all files with specific frontmatter property\n  getFilesWithProperty(property: string, value?: any): TFile[] {\n    return this.app.vault.getMarkdownFiles().filter(file => {\n      const fm = this.getFrontmatter(file);\n      if (!fm || !(property in fm)) return false;\n      if (value !== undefined) return fm[property] === value;\n      return true;\n    });\n  }\n}\n```\n\n### Step 3: Link and Tag Operations\n```typescript\nimport { App, TFile, CachedMetadata } from 'obsidian';\n\nexport class LinkService {\n  constructor(private app: App) {}\n\n  \u002F\u002F Get all links from a file\n  getOutgoingLinks(file: TFile): string[] {\n    const cache = this.app.metadataCache.getFileCache(file);\n    const links: string[] = [];\n\n    \u002F\u002F Wiki-style links [[link]]\n    cache?.links?.forEach(link => {\n      links.push(link.link);\n    });\n\n    \u002F\u002F Embeds ![[embed]]\n    cache?.embeds?.forEach(embed => {\n      links.push(embed.link);\n    });\n\n    return [...new Set(links)];\n  }\n\n  \u002F\u002F Get backlinks (files linking to this file)\n  getBacklinks(file: TFile): TFile[] {\n    const backlinks: TFile[] = [];\n    const resolvedLinks = this.app.metadataCache.resolvedLinks;\n\n    for (const [sourcePath, links] of Object.entries(resolvedLinks)) {\n      if (file.path in links) {\n        const sourceFile = this.app.vault.getAbstractFileByPath(sourcePath);\n        if (sourceFile instanceof TFile) {\n          backlinks.push(sourceFile);\n        }\n      }\n    }\n\n    return backlinks;\n  }\n\n  \u002F\u002F Get all tags from a file\n  getTags(file: TFile): string[] {\n    const cache = this.app.metadataCache.getFileCache(file);\n    const tags: string[] = [];\n\n    \u002F\u002F Tags in content\n    cache?.tags?.forEach(tag => {\n      tags.push(tag.tag);\n    });\n\n    \u002F\u002F Tags in frontmatter\n    const fmTags = cache?.frontmatter?.tags;\n    if (Array.isArray(fmTags)) {\n      fmTags.forEach(tag => {\n        tags.push(tag.startsWith('#') ? tag : `#${tag}`);\n      });\n    }\n\n    return [...new Set(tags)];\n  }\n\n  \u002F\u002F Get all files with specific tag\n  getFilesWithTag(tag: string): TFile[] {\n    const normalizedTag = tag.startsWith('#') ? tag : `#${tag}`;\n\n    return this.app.vault.getMarkdownFiles().filter(file => {\n      const tags = this.getTags(file);\n      return tags.includes(normalizedTag);\n    });\n  }\n\n  \u002F\u002F Update link in file (when target is renamed)\n  async updateLink(\n    file: TFile,\n    oldLink: string,\n    newLink: string\n  ): Promise\u003Cvoid> {\n    let content = await this.app.vault.read(file);\n\n    \u002F\u002F Update wiki links\n    content = content.replace(\n      new RegExp(`\\\\[\\\\[${this.escapeRegex(oldLink)}(\\\\|[^\\\\]]*)?\\\\]\\\\]`, 'g'),\n      (match, alias) => `[[${newLink}${alias || ''}]]`\n    );\n\n    await this.app.vault.modify(file, content);\n  }\n\n  private escapeRegex(str: string): string {\n    return str.replace(\u002F[.*+?^${}()|[\\]\\\\]\u002Fg, '\\\\$&');\n  }\n}\n```\n\n### Step 4: Search and Query\n```typescript\nimport { App, TFile, prepareFuzzySearch, prepareSimpleSearch } from 'obsidian';\n\nexport class SearchService {\n  constructor(private app: App) {}\n\n  \u002F\u002F Fuzzy search file names\n  searchFileNames(query: string): TFile[] {\n    const search = prepareFuzzySearch(query);\n    const results: { file: TFile; score: number }[] = [];\n\n    for (const file of this.app.vault.getMarkdownFiles()) {\n      const match = search(file.basename);\n      if (match) {\n        results.push({ file, score: match.score });\n      }\n    }\n\n    return results\n      .sort((a, b) => b.score - a.score)\n      .map(r => r.file);\n  }\n\n  \u002F\u002F Simple text search in content\n  async searchContent(query: string): Promise\u003C{ file: TFile; matches: number }[]> {\n    const search = prepareSimpleSearch(query);\n    const results: { file: TFile; matches: number }[] = [];\n\n    for (const file of this.app.vault.getMarkdownFiles()) {\n      const content = await this.app.vault.cachedRead(file);\n      const match = search(content);\n      if (match) {\n        results.push({ file, matches: match.matches.length });\n      }\n    }\n\n    return results.sort((a, b) => b.matches - a.matches);\n  }\n\n  \u002F\u002F Search by multiple criteria\n  async advancedSearch(criteria: {\n    folder?: string;\n    tags?: string[];\n    frontmatter?: Record\u003Cstring, any>;\n    content?: string;\n  }): Promise\u003CTFile[]> {\n    let files = this.app.vault.getMarkdownFiles();\n\n    \u002F\u002F Filter by folder\n    if (criteria.folder) {\n      files = files.filter(f => f.path.startsWith(criteria.folder!));\n    }\n\n    \u002F\u002F Filter by tags\n    if (criteria.tags?.length) {\n      const linkService = new LinkService(this.app);\n      files = files.filter(f => {\n        const fileTags = linkService.getTags(f);\n        return criteria.tags!.every(tag =>\n          fileTags.includes(tag.startsWith('#') ? tag : `#${tag}`)\n        );\n      });\n    }\n\n    \u002F\u002F Filter by frontmatter\n    if (criteria.frontmatter) {\n      const fmService = new FrontmatterService(this.app);\n      files = files.filter(f => {\n        const fm = fmService.getFrontmatter(f);\n        if (!fm) return false;\n        return Object.entries(criteria.frontmatter!).every(\n          ([key, value]) => fm[key] === value\n        );\n      });\n    }\n\n    \u002F\u002F Filter by content\n    if (criteria.content) {\n      const search = prepareSimpleSearch(criteria.content);\n      const contentMatches: TFile[] = [];\n      for (const file of files) {\n        const content = await this.app.vault.cachedRead(file);\n        if (search(content)) {\n          contentMatches.push(file);\n        }\n      }\n      files = contentMatches;\n    }\n\n    return files;\n  }\n}\n```\n\n## Output\n- File operations for create, read, update, delete\n- Frontmatter parsing and modification\n- Link and tag traversal\n- Search and query capabilities\n\n## Error Handling\n| Error | Cause | Solution |\n|-------|-------|----------|\n| File not found | Path incorrect | Verify with `getAbstractFileByPath` |\n| Permission denied | File locked | Check if file is open in editor |\n| YAML parse error | Invalid frontmatter | Validate YAML syntax |\n| Circular links | Recursive backlinks | Track visited files |\n\n## Examples\n\n### Complete Note Template\n```typescript\nasync function createNoteFromTemplate(\n  app: App,\n  templatePath: string,\n  newPath: string,\n  variables: Record\u003Cstring, string>\n): Promise\u003CTFile> {\n  const template = app.vault.getAbstractFileByPath(templatePath);\n  if (!(template instanceof TFile)) {\n    throw new Error('Template not found');\n  }\n\n  let content = await app.vault.read(template);\n\n  \u002F\u002F Replace variables\n  for (const [key, value] of Object.entries(variables)) {\n    content = content.replace(new RegExp(`{{${key}}}`, 'g'), value);\n  }\n\n  return app.vault.create(newPath, content);\n}\n```\n\n## Resources\n- [Obsidian Developer Docs - Vault](https:\u002F\u002Fdocs.obsidian.md\u002FReference\u002FTypeScript+API\u002FVault)\n- [Obsidian MetadataCache](https:\u002F\u002Fdocs.obsidian.md\u002FReference\u002FTypeScript+API\u002FMetadataCache)\n\n## Next Steps\nFor UI components, see `obsidian-core-workflow-b`.\n","# Obsidian Core Workflow A: Vault Operations\n\n## Overview\nPrimary workflow for Obsidian plugin development: manipulating notes, handling frontmatter, and working with the vault file system.\n\n## Prerequisites\n- Completed `obsidian-install-auth` setup\n- Understanding of Obsidian's file structure\n- Valid development vault configured\n\n## Instructions\n\n### Step 1: Working with Files (TFile)\n```typescript\nimport { TFile, TFolder, TAbstractFile, Vault } from 'obsidian';\n\nexport class FileOperations {\n  constructor(private vault: Vault) {}\n\n  \u002F\u002F Get all markdown files\n  getAllNotes(): TFile[] {\n    return this.vault.getMarkdownFiles();\n  }\n\n  \u002F\u002F Get file by path\n  getNote(path: string): TFile | null {\n    const file = this.vault.getAbstractFileByPath(path);\n    return file instanceof TFile ? file : null;\n  }\n\n  \u002F\u002F Read file content\n  async readNote(file: TFile): Promise\u003Cstring> {\n    return this.vault.read(file);\n  }\n\n  \u002F\u002F Read file content as cached (faster, may be stale)\n  readNoteCached(file: TFile): string | null {\n    return this.vault.cachedRead(file);\n  }\n\n  \u002F\u002F Modify file content\n  async writeNote(file: TFile, content: string): Promise\u003Cvoid> {\n    await this.vault.modify(file, content);\n  }\n\n  \u002F\u002F Create new note\n  async createNote(path: string, content: string): Promise\u003CTFile> {\n    \u002F\u002F Ensure parent folder exists\n    const folderPath = path.substring(0, path.lastIndexOf('\u002F'));\n    if (folderPath) {\n      await this.ensureFolder(folderPath);\n    }\n    return this.vault.create(path, content);\n  }\n\n  \u002F\u002F Delete note\n  async deleteNote(file: TFile, trash: boolean = true): Promise\u003Cvoid> {\n    if (trash) {\n      await this.vault.trash(file, false); \u002F\u002F Move to system trash\n    } else {\n      await this.vault.delete(file);\n    }\n  }\n\n  \u002F\u002F Rename\u002Fmove note\n  async renameNote(file: TFile, newPath: string): Promise\u003Cvoid> {\n    await this.vault.rename(file, newPath);\n  }\n\n  \u002F\u002F Ensure folder exists\n  private async ensureFolder(path: string): Promise\u003Cvoid> {\n    const folder = this.vault.getAbstractFileByPath(path);\n    if (!folder) {\n      await this.vault.createFolder(path);\n    }\n  }\n}\n```\n\n### Step 2: Frontmatter Operations\n```typescript\nimport { App, TFile, parseYaml, stringifyYaml } from 'obsidian';\n\nexport class FrontmatterService {\n  constructor(private app: App) {}\n\n  \u002F\u002F Extract frontmatter from note\n  getFrontmatter(file: TFile): Record\u003Cstring, any> | null {\n    const cache = this.app.metadataCache.getFileCache(file);\n    return cache?.frontmatter || null;\n  }\n\n  \u002F\u002F Parse frontmatter from content\n  parseFrontmatter(content: string): { frontmatter: Record\u003Cstring, any> | null; body: string } {\n    const match = content.match(\u002F^---\\n([\\s\\S]*?)\\n---\\n([\\s\\S]*)$\u002F);\n    if (!match) {\n      return { frontmatter: null, body: content };\n    }\n\n    try {\n      const frontmatter = parseYaml(match[1]);\n      return { frontmatter, body: match[2] };\n    } catch {\n      return { frontmatter: null, body: content };\n    }\n  }\n\n  \u002F\u002F Update frontmatter in file\n  async updateFrontmatter(\n    file: TFile,\n    updates: Record\u003Cstring, any>\n  ): Promise\u003Cvoid> {\n    const content = await this.app.vault.read(file);\n    const { frontmatter, body } = this.parseFrontmatter(content);\n\n    const newFrontmatter = { ...frontmatter, ...updates };\n    const yamlContent = stringifyYaml(newFrontmatter);\n    const newContent = `---\\n${yamlContent}---\\n${body}`;\n\n    await this.app.vault.modify(file, newContent);\n  }\n\n  \u002F\u002F Remove frontmatter property\n  async removeFrontmatterProperty(file: TFile, key: string): Promise\u003Cvoid> {\n    const content = await this.app.vault.read(file);\n    const { frontmatter, body } = this.parseFrontmatter(content);\n\n    if (frontmatter && key in frontmatter) {\n      delete frontmatter[key];\n      const yamlContent = stringifyYaml(frontmatter);\n      const newContent = `---\\n${yamlContent}---\\n${body}`;\n      await this.app.vault.modify(file, newContent);\n    }\n  }\n\n  \u002F\u002F Get all files with specific frontmatter property\n  getFilesWithProperty(property: string, value?: any): TFile[] {\n    return this.app.vault.getMarkdownFiles().filter(file => {\n      const fm = this.getFrontmatter(file);\n      if (!fm || !(property in fm)) return false;\n      if (value !== undefined) return fm[property] === value;\n      return true;\n    });\n  }\n}\n```\n\n### Step 3: Link and Tag Operations\n```typescript\nimport { App, TFile, CachedMetadata } from 'obsidian';\n\nexport class LinkService {\n  constructor(private app: App) {}\n\n  \u002F\u002F Get all links from a file\n  getOutgoingLinks(file: TFile): string[] {\n    const cache = this.app.metadataCache.getFileCache(file);\n    const links: string[] = [];\n\n    \u002F\u002F Wiki-style links [[link]]\n    cache?.links?.forEach(link => {\n      links.push(link.link);\n    });\n\n    \u002F\u002F Embeds ![[embed]]\n    cache?.embeds?.forEach(embed => {\n      links.push(embed.link);\n    });\n\n    return [...new Set(links)];\n  }\n\n  \u002F\u002F Get backlinks (files linking to this file)\n  getBacklinks(file: TFile): TFile[] {\n    const backlinks: TFile[] = [];\n    const resolvedLinks = this.app.metadataCache.resolvedLinks;\n\n    for (const [sourcePath, links] of Object.entries(resolvedLinks)) {\n      if (file.path in links) {\n        const sourceFile = this.app.vault.getAbstractFileByPath(sourcePath);\n        if (sourceFile instanceof TFile) {\n          backlinks.push(sourceFile);\n        }\n      }\n    }\n\n    return backlinks;\n  }\n\n  \u002F\u002F Get all tags from a file\n  getTags(file: TFile): string[] {\n    const cache = this.app.metadataCache.getFileCache(file);\n    const tags: string[] = [];\n\n    \u002F\u002F Tags in content\n    cache?.tags?.forEach(tag => {\n      tags.push(tag.tag);\n    });\n\n    \u002F\u002F Tags in frontmatter\n    const fmTags = cache?.frontmatter?.tags;\n    if (Array.isArray(fmTags)) {\n      fmTags.forEach(tag => {\n        tags.push(tag.startsWith('#') ? tag : `#${tag}`);\n      });\n    }\n\n    return [...new Set(tags)];\n  }\n\n  \u002F\u002F Get all files with specific tag\n  getFilesWithTag(tag: string): TFile[] {\n    const normalizedTag = tag.startsWith('#') ? tag : `#${tag}`;\n\n    return this.app.vault.getMarkdownFiles().filter(file => {\n      const tags = this.getTags(file);\n      return tags.includes(normalizedTag);\n    });\n  }\n\n  \u002F\u002F Update link in file (when target is renamed)\n  async updateLink(\n    file: TFile,\n    oldLink: string,\n    newLink: string\n  ): Promise\u003Cvoid> {\n    let content = await this.app.vault.read(file);\n\n    \u002F\u002F Update wiki links\n    content = content.replace(\n      new RegExp(`\\\\[\\\\[${this.escapeRegex(oldLink)}(\\\\|[^\\\\]]*)?\\\\]\\\\]`, 'g'),\n      (match, alias) => `[[${newLink}${alias || ''}]]`\n    );\n\n    await this.app.vault.modify(file, content);\n  }\n\n  private escapeRegex(str: string): string {\n    return str.replace(\u002F[.*+?^${}()|[\\]\\\\]\u002Fg, '\\\\$&');\n  }\n}\n```\n\n### Step 4: Search and Query\n```typescript\nimport { App, TFile, prepareFuzzySearch, prepareSimpleSearch } from 'obsidian';\n\nexport class SearchService {\n  constructor(private app: App) {}\n\n  \u002F\u002F Fuzzy search file names\n  searchFileNames(query: string): TFile[] {\n    const search = prepareFuzzySearch(query);\n    const results: { file: TFile; score: number }[] = [];\n\n    for (const file of this.app.vault.getMarkdownFiles()) {\n      const match = search(file.basename);\n      if (match) {\n        results.push({ file, score: match.score });\n      }\n    }\n\n    return results\n      .sort((a, b) => b.score - a.score)\n      .map(r => r.file);\n  }\n\n  \u002F\u002F Simple text search in content\n  async searchContent(query: string): Promise\u003C{ file: TFile; matches: number }[]> {\n    const search = prepareSimpleSearch(query);\n    const results: { file: TFile; matches: number }[] = [];\n\n    for (const file of this.app.vault.getMarkdownFiles()) {\n      const content = await this.app.vault.cachedRead(file);\n      const match = search(content);\n      if (match) {\n        results.push({ file, matches: match.matches.length });\n      }\n    }\n\n    return results.sort((a, b) => b.matches - a.matches);\n  }\n\n  \u002F\u002F Search by multiple criteria\n  async advancedSearch(criteria: {\n    folder?: string;\n    tags?: string[];\n    frontmatter?: Record\u003Cstring, any>;\n    content?: string;\n  }): Promise\u003CTFile[]> {\n    let files = this.app.vault.getMarkdownFiles();\n\n    \u002F\u002F Filter by folder\n    if (criteria.folder) {\n      files = files.filter(f => f.path.startsWith(criteria.folder!));\n    }\n\n    \u002F\u002F Filter by tags\n    if (criteria.tags?.length) {\n      const linkService = new LinkService(this.app);\n      files = files.filter(f => {\n        const fileTags = linkService.getTags(f);\n        return criteria.tags!.every(tag =>\n          fileTags.includes(tag.startsWith('#') ? tag : `#${tag}`)\n        );\n      });\n    }\n\n    \u002F\u002F Filter by frontmatter\n    if (criteria.frontmatter) {\n      const fmService = new FrontmatterService(this.app);\n      files = files.filter(f => {\n        const fm = fmService.getFrontmatter(f);\n        if (!fm) return false;\n        return Object.entries(criteria.frontmatter!).every(\n          ([key, value]) => fm[key] === value\n        );\n      });\n    }\n\n    \u002F\u002F Filter by content\n    if (criteria.content) {\n      const search = prepareSimpleSearch(criteria.content);\n      const contentMatches: TFile[] = [];\n      for (const file of files) {\n        const content = await this.app.vault.cachedRead(file);\n        if (search(content)) {\n          contentMatches.push(file);\n        }\n      }\n      files = contentMatches;\n    }\n\n    return files;\n  }\n}\n```\n\n## Output\n- File operations for create, read, update, delete\n- Frontmatter parsing and modification\n- Link and tag traversal\n- Search and query capabilities\n\n## Error Handling\n| Error | Cause | Solution |\n|-------|-------|----------|\n| File not found | Path incorrect | Verify with `getAbstractFileByPath` |\n| Permission denied | File locked | Check if file is open in editor |\n| YAML parse error | Invalid frontmatter | Validate YAML syntax |\n| Circular links | Recursive backlinks | Track visited files |\n\n## Examples\n\n### Complete Note Template\n```typescript\nasync function createNoteFromTemplate(\n  app: App,\n  templatePath: string,\n  newPath: string,\n  variables: Record\u003Cstring, string>\n): Promise\u003CTFile> {\n  const template = app.vault.getAbstractFileByPath(templatePath);\n  if (!(template instanceof TFile)) {\n    throw new Error('Template not found');\n  }\n\n  let content = await app.vault.read(template);\n\n  \u002F\u002F Replace variables\n  for (const [key, value] of Object.entries(variables)) {\n    content = content.replace(new RegExp(`{{${key}}}`, 'g'), value);\n  }\n\n  return app.vault.create(newPath, content);\n}\n```\n\n## Resources\n- [Obsidian Developer Docs - Vault](https:\u002F\u002Fdocs.obsidian.md\u002FReference\u002FTypeScript+API\u002FVault)\n- [Obsidian MetadataCache](https:\u002F\u002Fdocs.obsidian.md\u002FReference\u002FTypeScript+API\u002FMetadataCache)\n\n## Next Steps\nFor UI components, see `obsidian-core-workflow-b`.\n",{"name":5,"author":54,"license":15,"version":55,"description":56,"allowed-tools":57},"Jeremy Longshore \u003Cjeremy@intentsolutions.io>","1.0.0","Execute Obsidian primary workflow: note manipulation and vault operations.\nUse when implementing file operations, frontmatter handling,\nor programmatic note creation and modification.\nTrigger with phrases like \"obsidian vault operations\",\n\"obsidian file manipulation\", \"obsidian note management\".\n","Read, Write, Edit, Bash(npm:*), Grep","main","90b50ed0778745a80fd5bfb13b1843d45b9e82f7","tests\u002Fext_conformance\u002Fartifacts\u002Fplugins-community\u002Fplugins\u002Fsaas-packs\u002Fobsidian-pack\u002Fskills\u002Fobsidian-core-workflow-a",233,"https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust","https:\u002F\u002Fgithub.com\u002FDicklesworthstone","https:\u002F\u002Fwww.jeffreyemanuel.com\u002F","Building in NY","2026-11-15 01:54:15",{"source":8,"skillName":5,"commands":68,"prompt":78,"zipAvailable":79},[69,72,75],{"tool":70,"command":71},"npx","npx skills add Dicklesworthstone\u002Fpi_agent_rust --skill obsidian-core-workflow-a",{"tool":73,"command":74},"bunx","bunx skills add Dicklesworthstone\u002Fpi_agent_rust --skill obsidian-core-workflow-a",{"tool":76,"command":77},"pnpm","pnpm dlx skills add Dicklesworthstone\u002Fpi_agent_rust --skill obsidian-core-workflow-a","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Fplugins-community\u002Fplugins\u002Fsaas-packs\u002Fobsidian-pack\u002Fskills\u002Fobsidian-core-workflow-a\u002FSKILL.md",true,[],[82,113,147,170,196,221],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":86,"licenseFileUrl":87,"sourceHtmlUrl":88,"categories":89,"keywords":93,"publishedAt":112},"01M6FCR7G5A005P364Z6ZWCJDP","theme-factory","Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with colors\u002Ffonts that you can apply to any artifact that has been creating, or can generate a new theme on-the-fly.","Apache-2.0","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fcreative-design\u002Ftheme-factory\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fcreative-design\u002Ftheme-factory\u002FSKILL.md",[90],{"categoryNo":91,"categoryName":92,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000015","视觉设计",[94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,33,110,111],"theme factory","factory","theme","docs","toolkit","generate","artifacts","SET","fly","slides","landing","html","styling","artifact","pages","themes","you","fonts","2026-11-11 15:11:14",{"skillNo":114,"name":115,"nameZh":6,"description":116,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":86,"licenseFileUrl":117,"sourceHtmlUrl":118,"categories":119,"keywords":123,"publishedAt":49},"01M6FEGPPK0ZTKCCM0R3E3KS33","web-artifacts-builder","Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn\u002Fui). Use for complex artifacts requiring state management, routing, or shadcn\u002Fui components - not for simple single-file HTML\u002FJSX artifacts.","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Futilities\u002Fweb-artifacts-builder\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Futilities\u002Fweb-artifacts-builder\u002FSKILL.md",[120],{"categoryNo":121,"categoryName":122,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000009","前端开发",[124,125,100,126,127,128,129,130,131,132,133,134,135,136,47,137,138,139,37,105,140,141,142,143,144,145,146],"web artifacts builder","web","artifacts builder","builder","frontend","css","components","react","component","routing","state management","state","shadcn","ui","Tools","Tailwind","single-file","simple","ui components","multi","for","jsx","suite",{"skillNo":148,"name":149,"nameZh":6,"description":150,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":86,"licenseFileUrl":151,"sourceHtmlUrl":152,"categories":153,"keywords":158,"publishedAt":49},"01M6FEE9VTK1W4GY21AKREJXRG","webapp-testing","Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fsecurity\u002Fwebapp-testing\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fsecurity\u002Fwebapp-testing\u002FSKILL.md",[154,157],{"categoryNo":155,"categoryName":156,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000008","测试与质量",{"categoryNo":121,"categoryName":122,"taxonomyType":21,"taxonomyTypeDesc":22},[159,160,161,128,162,163,125,164,98,165,137,166,167,168,169,33,144],"testing","webapp testing","webapp","screenshots","playwright","debugging","browser","logs","applications","behavior","local",{"skillNo":171,"name":172,"nameZh":6,"description":173,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":174,"sourceHtmlUrl":175,"categories":176,"keywords":177,"publishedAt":49},"01M6FE20F7ZTQBFWKF4MPJ2SBX","neuropixels-analysis","Neuropixels neural recording analysis. Load SpikeGLX\u002FOpenEphys data, preprocess, motion correction, Kilosort4 spike sorting, quality metrics, Allen\u002FIBL curation, AI-assisted visual analysis, for Neuropixels 1.0\u002F2.0 extracellular electrophysiology. Use when working with neural recordings, spike sorting, extracellular electrophysiology, or when the user mentions Neuropixels, SpikeGLX, Open Ephys, Kilosort, quality metrics, or unit curation.","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fscientific\u002Fneuropixels-analysis\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fscientific\u002Fneuropixels-analysis\u002FSKILL.md",[],[178,179,180,181,182,183,184,185,37,186,187,188,189,190,191,192,33,193,194,195,144,28],"analysis","neuropixels analysis","spike","metrics","data","open","quality","user","recordings","Neural","motion","visual","quality metrics","unit","sorting","curation","recording","load",{"skillNo":197,"name":198,"nameZh":6,"description":199,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":86,"licenseFileUrl":200,"sourceHtmlUrl":201,"categories":202,"keywords":204,"publishedAt":49},"01M6FDP0PDK6F1GGX395C7625Z","skill-creator","Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fproductivity\u002Fskill-creator\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fproductivity\u002Fskill-creator\u002FSKILL.md",[203],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[205,206,207,208,209,210,211,212,213,214,215,216,217,218,33,144,219,28,220],"skill creator","creator","workflows","create","update","capabilities","knowledge","tool","integrations","specialized","guide","new skill","existing skill","users","Existing","new",{"skillNo":222,"name":223,"nameZh":6,"description":224,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":225,"sourceHtmlUrl":226,"categories":227,"keywords":229,"publishedAt":49},"01M6FDM8Y7VK7NYG9SM7QPA3PW","notebooklm","Use this skill to query your Google NotebookLM notebooks directly from Claude Code for source-grounded, citation-backed answers from Gemini. Browser automation, library management, persistent auth. Drastically reduced hallucinations through document-only responses.","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fproductivity\u002Fnotebooklm\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FDicklesworthstone\u002Fpi_agent_rust\u002Fblob\u002Fmain\u002Ftests\u002Fext_conformance\u002Fartifacts\u002Ftemplates-davila7\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fproductivity\u002Fnotebooklm\u002FSKILL.md",[228],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[223,230,231,232,233,234,235,165,236,237,37,238,239,240,241,144,242],"google","browser automation","gemini","automation","auth","code","library","management","only","document","query","Citation","source"]