What Obsidian Features Are Utilized by the Patent-Reader Sub-Skill
The patent-reader sub-skill automatically configures eight core Obsidian features—CSS snippets, the Bases core plugin, graph colour groups, callout customisation, optional community plugin integration, CLI property setting, vault folder structure, and YAML-based dashboards—to transform patent disclosures into a visually organised, searchable knowledge base.
The patent-reader sub-skill in the handsomestWei/patent-disclosure-skill repository eliminates manual Obsidian setup by programmatically configuring your vault. It writes configuration files directly to .obsidian/ and generates structured notes that leverage both native and optional community features. This deep integration turns raw patent data into an interactive research environment.
CSS Snippet for Custom Callout Styling
The skill deploys a dedicated CSS snippet (patent-reader.css) that defines visual styling for patent-specific callouts.
Upon first run, the skill copies this file to .obsidian/snippets/patent-reader.css and automatically tags every generated note with cssclasses: patent-reader in the YAML frontmatter. The snippet declares seven custom callout types:
patent-meta— publication metadatagrounding— evidence scope and citationsspeculative— interpretation noteswarning— critical alertspatent-claim— claim analysisfigure— figure descriptionstip— usage suggestions
Source: [skills/patent-reader/assets/obsidian/patent-reader.css](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/skills/patent-reader/assets/obsidian/patent-reader.css) (lines 3-18, 62-64)
note_md = f"""---
cssclasses: patent-reader
pub_number: {pub_number}
domain: {domain}
---
> [!patent-meta] 公开号
> {pub_number}
> [!grounding] 证据范围
> {evidence_scope}
"""
The CSS classes render each callout with distinct colours and icons, making patent structure instantly scannable.
Bases Core Plugin for Searchable Patent Tables
The Bases core plugin provides a dashboard interface for tabular data. The patent-reader sub-skill enables this plugin automatically and creates two base definitions:
patents.base.yaml— A searchable index of all decoded patentsglossary.base.yaml— A terminology reference for technical terms
Source files: [patents.base.yaml](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/skills/patent-reader/assets/obsidian/patents.base.yaml), [glossary.base.yaml](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/skills/patent-reader/assets/obsidian/glossary.base.yaml)
The skill writes these to Research/Patents/ and enables the plugin via .obsidian/core-plugins.json:
import json, pathlib
core_plugins_path = vault / ".obsidian" / "core-plugins.json"
cfg = json.loads(core_plugins_path.read_text())
cfg.setdefault("bases", {})["enabled"] = True
core_plugins_path.write_text(json.dumps(cfg, indent=2))
Implementation: skills/patent-reader/tools/vault/obsidian.py (lines 2192-2195)
Graph Colour Groups for Visual Relationship Mapping
To distinguish patent-related notes in Obsidian's relationship graph, the skill writes colour group definitions directly into .obsidian/graph.json:
graph_path = vault / ".obsidian" / "graph.json"
graph = json.loads(graph_path.read_text())
graph.setdefault("colorGroups", []).append({
"label": "专利解读",
"color": "#6385F1",
"tags": ["patents"]
})
graph_path.write_text(json.dumps(graph, indent=2))
This requires no additional plugins—patent notes appear in blue (#6385F1) automatically. Implementation: obsidian.py (lines 1985-1990)
Optional Community Plugin Integration
While not installing plugins automatically (per Obsidian's security model), the skill detects and writes configuration for optional enhancements:
Colored Tags Plugin
When installed, the skill populates .obsidian/plugins/colored-tags/data.json with tag-colour mappings:
# obsidian.py lines 2042-2045
colored_tags_path = vault / ".obsidian" / "plugins" / "colored-tags" / "data.json"
colored_tags_data = {"patents": "#6385F1", "glossary": "#4CAF50"}
colored_tags_path.write_text(json.dumps(colored_tags_data, indent=2))
Recommended Plugin Suite
The [obsidian-setup-guide.md](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/skills/patent-reader/docs/obsidian-setup-guide.md) (lines 72-78) documents these recommended additions:
- Dataview — Query-driven tables and lists
- Colored Tags — Tag-based colour coding
- Colored Bases Properties — Column colouring in Bases views
- Iconize — Custom sidebar and file icons
- Supercharged Links — Enhanced backlink visualisation
Obsidian CLI Property Setting
For advanced metadata workflows, the skill optionally invokes the Obsidian CLI (obsidian-cli) to set file properties programmatically. The try_obsidian_cli_property function attempts this when the CLI is detected:
# obsidian.py lines 2228-2234
def try_obsidian_cli_property(file_path: Path, key: str, value: str) -> bool:
cmd = ["obsidian", "--set-property", str(file_path), key, value]
try:
subprocess.run(cmd, check=True, capture_output=True)
return True
except (FileNotFoundError, subprocess.CalledProcessError):
return False
obsidian --set-property "Research/Patents/12345678/_解读_.md" \
"pub_number" "CN12345678"
This enables automation beyond YAML frontmatter for users with the CLI installed.
Vault Folder Structure and Organisation
The skill enforces a consistent vault layout under Research/Patents/:
Research/
└── Patents/
├── patents.base.yaml # Dashboard configuration
├── glossary.base.yaml # Terminology index
└── {pub_number}/
├── {pub_number}_解读_.md # Main analysis note
└── figures/ # Extracted patent figures
Supporting files populate .obsidian/:
Source: [obsidian-setup-guide.md](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/skills/patent-reader/docs/obsidian-setup-guide.md) (lines 34-38)
Dataview-Compatible Query Patterns
When Dataview is installed, notes support advanced queries. The Bases configuration generates Dataview-compatible frontmatter, enabling tables like:
```dataview
TABLE pub_number, domain, read_date, evidence_zh, speculative_zh
FROM "Research/Patents"
WHERE file.name.contains("_解读_")
SORT read_date DESC
This pattern appears in the skill's documentation as the recommended way to build custom patent review dashboards.
## Summary
The patent-reader sub-skill demonstrates deep **Obsidian feature utilisation** through:
- **Automatic CSS snippet deployment** with seven custom callout types
- **Native Bases core plugin activation** for tabular patent browsing
- **Graph.json manipulation** for visual relationship mapping
- **Conditional community plugin configuration** (Colored Tags detection)
- **CLI integration** for programmatic property setting
- **Standardised vault architecture** under `Research/Patents/`
- **Optional Dataview enhancement** for advanced querying
All configuration is handled in [`skills/patent-reader/tools/vault/obsidian.py`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/skills/patent-reader/tools/vault/obsidian.py), with asset templates stored in `skills/patent-reader/assets/obsidian/`.
## Frequently Asked Questions
### Does patent-reader require any manual Obsidian setup?
No. The sub-skill writes all necessary configuration files—CSS snippets, core plugin settings, graph colours, and base definitions—automatically upon first run. Users need only open the vault. Optional community plugins enhance the experience but are not required.
### Which Obsidian features work without installing community plugins?
Five features function natively: **CSS snippets** (custom callouts), **Bases core plugin** (dashboard tables), **graph colour groups** (visual node colouring), **YAML frontmatter** (metadata), and **folder structure organisation**. Only Colored Tags integration requires a community plugin installation.
### How does patent-reader handle existing Obsidian configurations?
The skill merges changes conservatively. For [`graph.json`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/graph.json) and [`core-plugins.json`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/core-plugins.json), it uses `setdefault()` patterns to append without overwriting existing user customisations. CSS snippets and base files are written fresh only if missing or outdated.
### Can I use patent-reader with an existing vault?
Yes. The skill accepts a `vault_path` parameter and writes its `.obsidian/` modifications into that location. Existing notes remain untouched; only the `Research/Patents/` subtree and configuration files are created or updated.
### Where is the Obsidian integration logic implemented?
All vault-writing operations are centralised in **[`skills/patent-reader/tools/vault/obsidian.py`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/skills/patent-reader/tools/vault/obsidian.py)**. Key functions include `write_graph_config()` (lines 1985-1990), `enable_bases_plugin()` (lines 2192-2195), `write_colored_tags()` (lines 2042-2045), and `try_obsidian_cli_property()` (lines 2228-2234).
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →