# Generate Mocs

> |

- **Type:** Skill
- **Install:** `agentstack add skill-huangkiki-dailypaper-skills-generate-mocs`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [huangkiki](https://agentstack.voostack.com/s/huangkiki)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** Apache-2.0
- **Upstream author:** [huangkiki](https://github.com/huangkiki)
- **Source:** https://github.com/huangkiki/dailypaper-skills/tree/main/skills/generate-mocs

## Install

```sh
agentstack add skill-huangkiki-dailypaper-skills-generate-mocs
```

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

## About

# 更新目录页

这个 skill 用于手动补刷 Obsidian 里的目录页 / 导航页（MOC）。

## Step 0: 读取共享配置

先读取 `../_shared/user-config.json`，如果 `../_shared/user-config.local.json` 存在，再用它覆盖默认值。

显式生成并在后续统一使用这些变量：

- `VAULT_PATH`
- `NOTES_PATH`
- `CONCEPTS_PATH`
- `AUTO_REFRESH_INDEXES`
- `GIT_COMMIT_ENABLED`
- `GIT_PUSH_ENABLED`

其中：

- `NOTES_PATH = {VAULT_PATH}/{paper_notes_folder}`
- `CONCEPTS_PATH = {NOTES_PATH}/{concepts_folder}`
- `GIT_PUSH_ENABLED` 只有在 `GIT_COMMIT_ENABLED=true` 时才可能为真

后续步骤统一使用上面的变量。

## 执行步骤

1. 运行概念目录页脚本：

```bash
python3 ../_shared/generate_concept_mocs.py
```

2. 运行论文目录页脚本：

```bash
python3 ../_shared/generate_paper_mocs.py
```

3. 汇报：
   - 扫描了多少个目录
   - 新建 / 更新了多少个目录页
   - 目录页文件写到了哪里

## git 自动化

默认配置下：

- `AUTO_REFRESH_INDEXES=true`
- `GIT_COMMIT_ENABLED=false`
- `GIT_PUSH_ENABLED=false`

只有在 `GIT_COMMIT_ENABLED=true` 时才做 git 操作，并且必须先检查：

1. `VAULT_PATH/.git` 是否存在
2. `git add` 之后是否真的有 staged changes

只有在上面两项都满足时才 commit。

只有在 `GIT_PUSH_ENABLED=true` 且仓库已配置远端时才 push。

## 结果要求

- 目录页生成逻辑必须来自仓库自带脚本，不依赖 `VAULT_PATH/scripts/*`
- 重复运行应保持幂等
- 用户手动运行这个 skill 时，不受 `AUTO_REFRESH_INDEXES` 开关影响

## Source & license

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

- **Author:** [huangkiki](https://github.com/huangkiki)
- **Source:** [huangkiki/dailypaper-skills](https://github.com/huangkiki/dailypaper-skills)
- **License:** Apache-2.0

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-huangkiki-dailypaper-skills-generate-mocs
- Seller: https://agentstack.voostack.com/s/huangkiki
- 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%.
