MCPcopy Index your code
hub / github.com/wshobson/agents / read_plugin_json

Function read_plugin_json

tools/adapters/base.py:26–33  ·  view source on GitHub ↗

Read and parse plugin.json from plugin directory.

(plugin_dir: Path)

Source from the content-addressed store, hash-verified

24
25
26def read_plugin_json(plugin_dir: Path) -> dict:
27 """Read and parse plugin.json from plugin directory."""
28 path = plugin_dir / ".claude-plugin" / "plugin.json"
29 try:
30 with open(path, encoding="utf-8") as f:
31 return json.load(f)
32 except (OSError, json.JSONDecodeError):
33 return {}
34
35
36def parse_frontmatter(content: str) -> tuple[dict, str]:

Callers 1

load_pluginFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected