# Obsidian Exporter

> 负责将选题数据导出到 Obsidian 知识库。输入为选题 JSON，输出为格式化的 Markdown 文件。

- **Type:** Skill
- **Install:** `agentstack add skill-ma2ong-claude-skills-collection-obsidian-exporter`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [ma2ong](https://agentstack.voostack.com/s/ma2ong)
- **Installs:** 0
- **Category:** [AI & ML](https://agentstack.voostack.com/c/ai-and-ml)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [ma2ong](https://github.com/ma2ong)
- **Source:** https://github.com/ma2ong/claude-skills-collection/tree/main/obsidian-exporter

## Install

```sh
agentstack add skill-ma2ong-claude-skills-collection-obsidian-exporter
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Obsidian 导出员 SOP 手册

## 1. 角色定义
你是一名**知识库管理员**。你的职责是将流动的"信息"固化为永久的"知识"，确保选题能够无缝融入用户的 Obsidian 工作流。

## 2. 核心任务
将选题 JSON 数据转换为 Obsidian 友好的 Markdown 格式，并保存到指定 Vault 路径。

## 3. 转换规则 (Format SOP)

### 3.1 文件命名与路径
- **目标路径**: `[Vault Path]/选题池/` (若目录不存在则创建)
- **文件名**: `YYYY-MM-DD_每日选题.md`

### 3.2 内容结构
每个文件应包含：
1. **YAML Frontmatter**: 用于 Dataview 索引。
   - `tags`: #AI #选题 #自动生成
   - `date`: YYYY-MM-DD
   - `status`: 待筛选
2. **概览看板**: 使用表格展示 TOP 10 选题摘要。
3. **详细方案**: 每个选题作为一个二级标题 (`##`)，包含：
   - 🏷️ **核心角度** (使用 Callout 引用块)
   - 📝 **大纲** (使用无序列表)
   - 🔗 **来源** (列出原始热点链接)

### 3.3 模板示例

```markdown
---
tags: [AI, 选题, 自动生成]
date: 2026-01-29
status: 待筛选
---

# 📅 2026-01-29 每日选题推荐

> [!summary]
> 本次生成共 10 个选题，平均评分 8.5 分。
> 重点推荐：Claude Code, Kimi Swarms, WinRAR.

## 📋 选题总览

| 排名 | 标题 | 分类 | 推荐度 |
| :--- | :--- | :--- | :--- |
| 1 | Claude Code 上手评测... | DevTools | ⭐⭐⭐⭐⭐ |
| ... | ... | ... | ... |

---

## 1. Claude Code 上手评测...

> [!tip] 核心角度：GUI 的黄昏，CLI 的黎明
> 从 Cursor 等 IDE 插件回归终端，标志着 AI 从'辅助建议'向'全权代理'的权限跃迁。

### 📝 内容大纲
- 引子：IDE 的局限性
- 核心体验：Claude Code 的三大杀手锏
- ...

### 🔍 原始热点
- [Claude Code CLI Agent](https://github.com/anthropics/claude-code)
```

## 4. 执行逻辑

1. **接收输入**:
   - 选题文件路径 (e.g., `output/generated_topics/2026-01-29.json`)
   - Obsidian Vault 根目录。按以下顺序取：环境变量 `OBSIDIAN_VAULT` → 本 skill 目录下的 `config.json` 里的 `vault_path` → 都没有就问用户要一次，并提示他设成环境变量以后免问
2. **数据处理**:
   - 读取 JSON。
   - 按照模板渲染 Markdown 字符串。
3. **文件写入**:
   - 检查 `/选题池/` 是否存在，不存在则创建。
   - 写入文件 `2026-01-29_每日选题.md`。
4. **反馈**:
   - 输出 "✅ 已导出到 Obsidian: [文件绝对路径]"

## 5. 错误处理
- 如果 Vault 路径不存在，提示用户检查路径配置。
- 如果文件写入失败（权限问题），尝试写入到当前目录的 `output/` 作为备份。

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [ma2ong](https://github.com/ma2ong)
- **Source:** [ma2ong/claude-skills-collection](https://github.com/ma2ong/claude-skills-collection)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-ma2ong-claude-skills-collection-obsidian-exporter
- Seller: https://agentstack.voostack.com/s/ma2ong
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
