This skill is used to manually refresh the directory page / navigation page (MOC) in Obsidian.
Step 0: Read shared configuration
First read ../_shared/user-config.json, if ../_shared/user-config.local.json exists, then use it to override the default values.
Explicitly generate and consistently use these variables in subsequent steps:
VAULT_PATHNOTES_PATHCONCEPTS_PATHAUTO_REFRESH_INDEXESGIT_COMMIT_ENABLEDGIT_PUSH_ENABLED
Where:
NOTES_PATH = {VAULT_PATH}/{paper_notes_folder}CONCEPTS_PATH = {NOTES_PATH}/{concepts_folder}GIT_PUSH_ENABLEDonly whenGIT_COMMIT_ENABLED=truecan it be true
Subsequent steps consistently use the above variables.
Execution steps
- Run the concept directory page script:
python3 ../_shared/generate_concept_mocs.py
- Run the paper directory page script:
python3 ../_shared/generate_paper_mocs.py
- Report:
- How many directories were scanned
- How many directory pages were created / updated
- Where the directory page files were written
git automation
Under the default configuration:
AUTO_REFRESH_INDEXES=trueGIT_COMMIT_ENABLED=falseGIT_PUSH_ENABLED=false
Only when GIT_COMMIT_ENABLED=true should git operations be performed, and the following must be checked first:
VAULT_PATH/.gitwhether it existsgit addwhether there are actually staged changes afterward
Only commit when both of the above conditions are met.
Only push when GIT_PUSH_ENABLED=true and the repository has a remote configured.
Result requirements
- The directory page generation logic must come from the repository's built-in script, not relying on
VAULT_PATH/scripts/* - Repeated runs should remain idempotent
- When the user manually runs this skill, it is not affected by the
AUTO_REFRESH_INDEXESswitch