opencode-skills-collection 4.0.69 → 4.0.70
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundled-skills/.antigravity-install-manifest.json +39 -1
- package/bundled-skills/api-integration-architect/SKILL.md +241 -0
- package/bundled-skills/apify-generate-output-schema/SKILL.md +438 -0
- package/bundled-skills/apify-integration-development/SKILL.md +168 -0
- package/bundled-skills/apify-integration-development/references/ai-framework-package.md +158 -0
- package/bundled-skills/apify-integration-development/references/ai-harness-plugin.md +192 -0
- package/bundled-skills/apify-integration-development/references/sdk-integration.md +236 -0
- package/bundled-skills/apify-integration-development/references/workflow-automation.md +163 -0
- package/bundled-skills/architecture-review/README.md +42 -0
- package/bundled-skills/architecture-review/SKILL.md +77 -0
- package/bundled-skills/architecture-review/examples.md +11 -0
- package/bundled-skills/architecture-review/reference/best-practices.md +7 -0
- package/bundled-skills/architecture-review/reference/capabilities.md +20 -0
- package/bundled-skills/architecture-review/reference/fallbacks.md +11 -0
- package/bundled-skills/architecture-review/reference/graph.md +15 -0
- package/bundled-skills/architecture-review/reference/mcp.md +14 -0
- package/bundled-skills/architecture-review/reference/workflow.md +15 -0
- package/bundled-skills/architecture-review/templates/architecture-review.md +21 -0
- package/bundled-skills/code-review-sensei/SKILL.md +177 -0
- package/bundled-skills/codebase-onboarding/README.md +42 -0
- package/bundled-skills/codebase-onboarding/SKILL.md +77 -0
- package/bundled-skills/codebase-onboarding/examples.md +11 -0
- package/bundled-skills/codebase-onboarding/reference/best-practices.md +7 -0
- package/bundled-skills/codebase-onboarding/reference/capabilities.md +20 -0
- package/bundled-skills/codebase-onboarding/reference/fallbacks.md +11 -0
- package/bundled-skills/codebase-onboarding/reference/graph.md +15 -0
- package/bundled-skills/codebase-onboarding/reference/mcp.md +14 -0
- package/bundled-skills/codebase-onboarding/reference/workflow.md +15 -0
- package/bundled-skills/codebase-onboarding/templates/repository-onboarding.md +21 -0
- package/bundled-skills/connection-auth-rules/SKILL.md +199 -0
- package/bundled-skills/connection-auth-rules/fetch_schema.py +320 -0
- package/bundled-skills/dependency-analysis/README.md +42 -0
- package/bundled-skills/dependency-analysis/SKILL.md +76 -0
- package/bundled-skills/dependency-analysis/examples.md +11 -0
- package/bundled-skills/dependency-analysis/reference/best-practices.md +7 -0
- package/bundled-skills/dependency-analysis/reference/capabilities.md +20 -0
- package/bundled-skills/dependency-analysis/reference/fallbacks.md +11 -0
- package/bundled-skills/dependency-analysis/reference/graph.md +15 -0
- package/bundled-skills/dependency-analysis/reference/mcp.md +14 -0
- package/bundled-skills/dependency-analysis/reference/workflow.md +15 -0
- package/bundled-skills/dependency-analysis/templates/dependency-review.md +21 -0
- package/bundled-skills/devops-pipeline-builder/SKILL.md +200 -0
- package/bundled-skills/eas-app-stores/SKILL.md +197 -0
- package/bundled-skills/eas-app-stores/agents/openai.yaml +4 -0
- package/bundled-skills/eas-app-stores/references/app-store-metadata.md +497 -0
- package/bundled-skills/eas-app-stores/references/ios-app-store.md +376 -0
- package/bundled-skills/eas-app-stores/references/native-ios.md +167 -0
- package/bundled-skills/eas-app-stores/references/play-store.md +244 -0
- package/bundled-skills/eas-app-stores/references/testflight.md +62 -0
- package/bundled-skills/eas-app-stores/references/workflows.md +120 -0
- package/bundled-skills/eas-hosting/SKILL.md +448 -0
- package/bundled-skills/eas-hosting/agents/openai.yaml +4 -0
- package/bundled-skills/eas-observe/SKILL.md +75 -0
- package/bundled-skills/eas-observe/agents/openai.yaml +4 -0
- package/bundled-skills/eas-observe/references/metrics.md +98 -0
- package/bundled-skills/eas-observe/references/queries.md +403 -0
- package/bundled-skills/eas-observe/references/setup.md +476 -0
- package/bundled-skills/eas-observe/references/third-party.md +136 -0
- package/bundled-skills/eas-simulator/SKILL.md +251 -0
- package/bundled-skills/eas-simulator/agents/openai.yaml +4 -0
- package/bundled-skills/eas-simulator/references/controllers.md +135 -0
- package/bundled-skills/eas-simulator/references/run-your-app.md +240 -0
- package/bundled-skills/eas-simulator/references/troubleshooting.md +47 -0
- package/bundled-skills/eas-workflows/SKILL.md +119 -0
- package/bundled-skills/eas-workflows/agents/openai.yaml +4 -0
- package/bundled-skills/eas-workflows/scripts/fetch.js +109 -0
- package/bundled-skills/expo-animation/LICENSE +21 -0
- package/bundled-skills/expo-animation/RECIPES.md +385 -0
- package/bundled-skills/expo-animation/SKILL.md +295 -0
- package/bundled-skills/expo-animation/agents/openai.yaml +4 -0
- package/bundled-skills/fact-check-x-unified/SKILL.md +178 -0
- package/bundled-skills/fact-check-x-unified/agents/openai.yaml +4 -0
- package/bundled-skills/fact-check-x-unified/references/acceptance-criteria.md +44 -0
- package/bundled-skills/fact-check-x-unified/references/contracts.md +39 -0
- package/bundled-skills/fact-check-x-unified/scripts/common.py +31 -0
- package/bundled-skills/fact-check-x-unified/scripts/fact_check_x.py +1832 -0
- package/bundled-skills/fact-check-x-unified/scripts/trusted_search_config.py +324 -0
- package/bundled-skills/fact-check-x-unified/tests/anchor_downgrade_test.py +90 -0
- package/bundled-skills/fact-check-x-unified/tests/multi_platform_test.py +369 -0
- package/bundled-skills/fact-check-x-unified/tests/smoke_test.py +740 -0
- package/bundled-skills/fact-check-x-unified/tests/stage_checkpoint_test.py +103 -0
- package/bundled-skills/fact-check-x-unified/tests/trusted_search_config_test.py +156 -0
- package/bundled-skills/gpt-taste/SKILL.md +8 -1
- package/bundled-skills/hf-cli/SKILL.md +263 -0
- package/bundled-skills/huggingface-community-evals/SKILL.md +228 -0
- package/bundled-skills/huggingface-community-evals/examples/.env.example +3 -0
- package/bundled-skills/huggingface-community-evals/examples/USAGE_EXAMPLES.md +101 -0
- package/bundled-skills/huggingface-community-evals/scripts/inspect_eval_uv.py +104 -0
- package/bundled-skills/huggingface-community-evals/scripts/inspect_vllm_uv.py +306 -0
- package/bundled-skills/huggingface-community-evals/scripts/lighteval_vllm_uv.py +297 -0
- package/bundled-skills/huggingface-datasets/SKILL.md +130 -0
- package/bundled-skills/jev-social/SKILL.md +182 -0
- package/bundled-skills/longbridge-derivatives/SKILL.md +117 -0
- package/bundled-skills/longbridge-derivatives/references/option.md +36 -0
- package/bundled-skills/longbridge-derivatives/references/options-advanced.md +101 -0
- package/bundled-skills/longbridge-derivatives/references/options-pnl.md +74 -0
- package/bundled-skills/longbridge-derivatives/references/options-strategy.md +82 -0
- package/bundled-skills/longbridge-derivatives/references/options-volatility.md +70 -0
- package/bundled-skills/longbridge-derivatives/references/warrant.md +12 -0
- package/bundled-skills/longbridge-quant/SKILL.md +151 -0
- package/bundled-skills/longbridge-quant/references/correlation.md +51 -0
- package/bundled-skills/longbridge-quant/references/execution-model.md +68 -0
- package/bundled-skills/longbridge-quant/references/factor-research.md +95 -0
- package/bundled-skills/longbridge-quant/references/factor-screen.md +101 -0
- package/bundled-skills/longbridge-quant/references/hedging.md +136 -0
- package/bundled-skills/longbridge-quant/references/ml-strategy.md +77 -0
- package/bundled-skills/longbridge-quant/references/multifactor.md +68 -0
- package/bundled-skills/longbridge-quant/references/pairs-trading.md +61 -0
- package/bundled-skills/longbridge-quant/references/quant-cli.md +133 -0
- package/bundled-skills/longbridge-quant/references/quant-stats.md +150 -0
- package/bundled-skills/longbridge-quant/references/seasonality.md +50 -0
- package/bundled-skills/longbridge-quant/references/strategy-optimizer.md +68 -0
- package/bundled-skills/longbridge-quant/references/volatility-strategy.md +52 -0
- package/bundled-skills/longbridge-research/SKILL.md +187 -0
- package/bundled-skills/longbridge-research/references/company-profile.md +96 -0
- package/bundled-skills/longbridge-research/references/company-tearsheet.md +82 -0
- package/bundled-skills/longbridge-research/references/competitive-analysis.md +81 -0
- package/bundled-skills/longbridge-research/references/consensus.md +92 -0
- package/bundled-skills/longbridge-research/references/coverage-initiation.md +76 -0
- package/bundled-skills/longbridge-research/references/defi-yield.md +60 -0
- package/bundled-skills/longbridge-research/references/finance-calendar.md +165 -0
- package/bundled-skills/longbridge-research/references/financial-planning.md +77 -0
- package/bundled-skills/longbridge-research/references/forecast-eps.md +39 -0
- package/bundled-skills/longbridge-research/references/fund-holder.md +44 -0
- package/bundled-skills/longbridge-research/references/hkipo-analysis.md +101 -0
- package/bundled-skills/longbridge-research/references/industry-peers.md +46 -0
- package/bundled-skills/longbridge-research/references/industry-rank.md +62 -0
- package/bundled-skills/longbridge-research/references/insider-trades.md +48 -0
- package/bundled-skills/longbridge-research/references/institution-rating.md +62 -0
- package/bundled-skills/longbridge-research/references/investment-ideas.md +69 -0
- package/bundled-skills/longbridge-research/references/investment-proposal.md +95 -0
- package/bundled-skills/longbridge-research/references/investors.md +87 -0
- package/bundled-skills/longbridge-research/references/onchain.md +70 -0
- package/bundled-skills/longbridge-research/references/post-investment.md +76 -0
- package/bundled-skills/longbridge-research/references/shareholder.md +72 -0
- package/bundled-skills/longbridge-research/references/short-positions.md +50 -0
- package/bundled-skills/longbridge-research/references/short-trades.md +50 -0
- package/bundled-skills/longbridge-research/references/stock-research.md +61 -0
- package/bundled-skills/longbridge-research/references/thesis-tracker.md +64 -0
- package/bundled-skills/makepad-2-0-animation/SKILL.md +318 -0
- package/bundled-skills/makepad-2-0-animation/references/animator-reference.md +433 -0
- package/bundled-skills/makepad-2-0-dsl/SKILL.md +492 -0
- package/bundled-skills/makepad-2-0-dsl/references/dsl-syntax-reference.md +511 -0
- package/bundled-skills/makepad-2-0-dsl/references/extended-guide.md +56 -0
- package/bundled-skills/makepad-2-0-dsl/references/property-system.md +757 -0
- package/bundled-skills/makepad-2-0-events/SKILL.md +497 -0
- package/bundled-skills/makepad-2-0-events/references/event-patterns.md +802 -0
- package/bundled-skills/makepad-2-0-events/references/extended-guide.md +590 -0
- package/bundled-skills/makepad-2-0-layout/SKILL.md +499 -0
- package/bundled-skills/makepad-2-0-layout/references/extended-guide.md +243 -0
- package/bundled-skills/makepad-2-0-layout/references/layout-patterns.md +881 -0
- package/bundled-skills/makepad-2-0-widgets/SKILL.md +261 -0
- package/bundled-skills/makepad-2-0-widgets/references/widget-advanced.md +648 -0
- package/bundled-skills/makepad-2-0-widgets/references/widget-catalog.md +547 -0
- package/bundled-skills/meeting-distiller-pro/SKILL.md +120 -0
- package/bundled-skills/monte-carlo-analyze-root-cause/SKILL.md +12 -1
- package/bundled-skills/monte-carlo-asset-health/SKILL.md +12 -1
- package/bundled-skills/monte-carlo-context-detection/SKILL.md +170 -0
- package/bundled-skills/monte-carlo-context-detection/references/signal-definitions.md +46 -0
- package/bundled-skills/remotion-captions/SKILL.md +57 -0
- package/bundled-skills/remotion-captions/agents/openai.yaml +7 -0
- package/bundled-skills/remotion-captions/assets/remotion-icon.svg +4 -0
- package/bundled-skills/remotion-captions/display-captions.md +190 -0
- package/bundled-skills/remotion-captions/import-srt-captions.md +73 -0
- package/bundled-skills/remotion-captions/transcribe-captions.md +70 -0
- package/bundled-skills/remotion-create/SKILL.md +106 -0
- package/bundled-skills/remotion-create/agents/openai.yaml +7 -0
- package/bundled-skills/remotion-create/assets/remotion-icon.svg +4 -0
- package/bundled-skills/remotion-create/tailwind.md +11 -0
- package/bundled-skills/remotion-create/video-layout.md +9 -0
- package/bundled-skills/remotion-docs/SKILL.md +67 -0
- package/bundled-skills/remotion-docs/agents/openai.yaml +7 -0
- package/bundled-skills/remotion-docs/assets/remotion-icon.svg +4 -0
- package/bundled-skills/remotion-interactivity/SKILL.md +270 -0
- package/bundled-skills/remotion-interactivity/agents/openai.yaml +7 -0
- package/bundled-skills/remotion-interactivity/assets/remotion-icon.svg +4 -0
- package/bundled-skills/remotion-render/SKILL.md +48 -0
- package/bundled-skills/remotion-render/agents/openai.yaml +7 -0
- package/bundled-skills/remotion-render/assets/remotion-icon.svg +4 -0
- package/bundled-skills/remotion-render/transparent-videos.md +106 -0
- package/bundled-skills/saas-pricing-strategist/SKILL.md +169 -0
- package/bundled-skills/score-eval/SKILL.md +35 -0
- package/bundled-skills/writing-guidelines/SKILL.md +60 -0
- package/package.json +1 -1
- package/skills_index.json +980 -3
|
@@ -0,0 +1,320 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
Fetch Connection Auth Rules schema from the apollo-agent GitHub repo.
|
|
4
|
+
|
|
5
|
+
Reads connector defaults and transform step contracts, then outputs JSON
|
|
6
|
+
for use by the connection-auth-rules skill.
|
|
7
|
+
|
|
8
|
+
Usage:
|
|
9
|
+
python3 fetch_schema.py --list
|
|
10
|
+
python3 fetch_schema.py --connector <name>
|
|
11
|
+
python3 fetch_schema.py --connector <name> --transforms
|
|
12
|
+
python3 fetch_schema.py --transforms
|
|
13
|
+
|
|
14
|
+
Set GITHUB_TOKEN env var to raise the GitHub API rate limit from 60 to
|
|
15
|
+
5,000 requests/hour.
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
from __future__ import annotations
|
|
19
|
+
|
|
20
|
+
import ast
|
|
21
|
+
import json
|
|
22
|
+
import os
|
|
23
|
+
import sys
|
|
24
|
+
import argparse
|
|
25
|
+
import urllib.request
|
|
26
|
+
import urllib.error
|
|
27
|
+
|
|
28
|
+
REPO = "monte-carlo-data/apollo-agent"
|
|
29
|
+
DEFAULTS_PATH = "apollo/integrations/ctp/defaults"
|
|
30
|
+
TRANSFORMS_PATH = "apollo/integrations/ctp/transforms"
|
|
31
|
+
GITHUB_API = f"https://api.github.com/repos/{REPO}/contents"
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def _headers() -> dict[str, str]:
|
|
35
|
+
headers = {"User-Agent": "mc-agent-toolkit/connection-auth-rules"}
|
|
36
|
+
token = os.environ.get("GITHUB_TOKEN")
|
|
37
|
+
if token:
|
|
38
|
+
headers["Authorization"] = f"Bearer {token}"
|
|
39
|
+
return headers
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def _fetch_json(url: str) -> object:
|
|
43
|
+
req = urllib.request.Request(url, headers=_headers())
|
|
44
|
+
with urllib.request.urlopen(req) as resp:
|
|
45
|
+
return json.loads(resp.read())
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
def _fetch_text(url: str) -> str:
|
|
49
|
+
req = urllib.request.Request(url, headers=_headers())
|
|
50
|
+
with urllib.request.urlopen(req) as resp:
|
|
51
|
+
return resp.read().decode("utf-8")
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
def _list_py_files(api_path: str) -> list[dict]:
|
|
55
|
+
entries = _fetch_json(f"{GITHUB_API}/{api_path}")
|
|
56
|
+
return [
|
|
57
|
+
{"name": e["name"].removesuffix(".py"), "download_url": e["download_url"]}
|
|
58
|
+
for e in entries
|
|
59
|
+
if e["type"] == "file"
|
|
60
|
+
and e["name"].endswith(".py")
|
|
61
|
+
and e["name"] != "__init__.py"
|
|
62
|
+
]
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
# ---------------------------------------------------------------------------
|
|
66
|
+
# AST helpers
|
|
67
|
+
# ---------------------------------------------------------------------------
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
def _ast_unparse(node: ast.expr) -> str:
|
|
71
|
+
# Return the actual string value for string constants — callers want the
|
|
72
|
+
# Jinja2 template text, not the Python repr with surrounding quotes.
|
|
73
|
+
if isinstance(node, ast.Constant) and isinstance(node.value, str):
|
|
74
|
+
return node.value
|
|
75
|
+
if hasattr(ast, "unparse"):
|
|
76
|
+
return ast.unparse(node)
|
|
77
|
+
if isinstance(node, ast.Constant):
|
|
78
|
+
return repr(node.value)
|
|
79
|
+
return "<complex expression>"
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
def _extract_dict(node: ast.expr) -> dict[str, str]:
|
|
83
|
+
if not isinstance(node, ast.Dict):
|
|
84
|
+
return {}
|
|
85
|
+
return {
|
|
86
|
+
k.value: _ast_unparse(v)
|
|
87
|
+
for k, v in zip(node.keys, node.values)
|
|
88
|
+
if isinstance(k, ast.Constant)
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
def _call_name(node: ast.Call) -> str:
|
|
93
|
+
if isinstance(node.func, ast.Name):
|
|
94
|
+
return node.func.id
|
|
95
|
+
if isinstance(node.func, ast.Attribute):
|
|
96
|
+
return node.func.attr
|
|
97
|
+
return ""
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
def _parse_step_call(call: ast.Call) -> dict:
|
|
101
|
+
# Default type to the constructor name; overridden by an explicit type= kwarg.
|
|
102
|
+
step: dict = {"type": _call_name(call)}
|
|
103
|
+
for kw in call.keywords:
|
|
104
|
+
if kw.arg == "type":
|
|
105
|
+
step["type"] = _ast_unparse(kw.value)
|
|
106
|
+
elif kw.arg in ("input", "output", "when", "field_map"):
|
|
107
|
+
step[kw.arg] = (
|
|
108
|
+
_extract_dict(kw.value)
|
|
109
|
+
if isinstance(kw.value, ast.Dict)
|
|
110
|
+
else _ast_unparse(kw.value)
|
|
111
|
+
)
|
|
112
|
+
return step
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
# ---------------------------------------------------------------------------
|
|
116
|
+
# Connector schema parsing
|
|
117
|
+
# ---------------------------------------------------------------------------
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
def _parse_connector_schema(source: str) -> dict:
|
|
121
|
+
tree = ast.parse(source)
|
|
122
|
+
|
|
123
|
+
output_keys: list[str] = []
|
|
124
|
+
default_field_map: dict[str, str] = {}
|
|
125
|
+
default_steps: list[dict] = []
|
|
126
|
+
|
|
127
|
+
for node in ast.walk(tree):
|
|
128
|
+
# TypedDict subclass → output keys
|
|
129
|
+
if isinstance(node, ast.ClassDef):
|
|
130
|
+
for base in node.bases:
|
|
131
|
+
is_typed_dict = (
|
|
132
|
+
isinstance(base, ast.Name) and base.id == "TypedDict"
|
|
133
|
+
) or (isinstance(base, ast.Attribute) and base.attr == "TypedDict")
|
|
134
|
+
if is_typed_dict:
|
|
135
|
+
output_keys.extend(
|
|
136
|
+
stmt.target.id
|
|
137
|
+
for stmt in node.body
|
|
138
|
+
if isinstance(stmt, ast.AnnAssign)
|
|
139
|
+
and isinstance(stmt.target, ast.Name)
|
|
140
|
+
)
|
|
141
|
+
|
|
142
|
+
if not isinstance(node, ast.Call):
|
|
143
|
+
continue
|
|
144
|
+
|
|
145
|
+
name = _call_name(node)
|
|
146
|
+
|
|
147
|
+
# MapperConfig(field_map={...})
|
|
148
|
+
if name == "MapperConfig":
|
|
149
|
+
for kw in node.keywords:
|
|
150
|
+
if kw.arg == "field_map":
|
|
151
|
+
default_field_map = _extract_dict(kw.value)
|
|
152
|
+
|
|
153
|
+
# CtpConfig(steps=[...], mapper=...)
|
|
154
|
+
if name == "CtpConfig":
|
|
155
|
+
for kw in node.keywords:
|
|
156
|
+
if kw.arg == "steps" and isinstance(kw.value, ast.List):
|
|
157
|
+
default_steps = [
|
|
158
|
+
_parse_step_call(elt)
|
|
159
|
+
for elt in kw.value.elts
|
|
160
|
+
if isinstance(elt, ast.Call)
|
|
161
|
+
]
|
|
162
|
+
|
|
163
|
+
return {
|
|
164
|
+
"output_keys": output_keys,
|
|
165
|
+
"default_field_map": default_field_map,
|
|
166
|
+
"default_steps": default_steps,
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
# ---------------------------------------------------------------------------
|
|
171
|
+
# Transform step parsing
|
|
172
|
+
# ---------------------------------------------------------------------------
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
def _parse_docstring_sections(docstring: str) -> dict[str, str]:
|
|
176
|
+
"""Extract Step input/output/field_map sections from a docstring."""
|
|
177
|
+
sections: dict[str, str] = {}
|
|
178
|
+
current_key: str | None = None
|
|
179
|
+
buf: list[str] = []
|
|
180
|
+
|
|
181
|
+
# Prefixes are matched with startswith so "Step field_map (typical usage):"
|
|
182
|
+
# is caught by the "Step field_map" prefix.
|
|
183
|
+
prefix_map = [
|
|
184
|
+
("Step input", "step_input"),
|
|
185
|
+
("Step output", "step_output"),
|
|
186
|
+
("Step field_map", "step_field_map"),
|
|
187
|
+
]
|
|
188
|
+
|
|
189
|
+
for line in docstring.splitlines():
|
|
190
|
+
stripped = line.strip()
|
|
191
|
+
matched = False
|
|
192
|
+
for prefix, key in prefix_map:
|
|
193
|
+
if stripped.startswith(prefix):
|
|
194
|
+
if current_key is not None:
|
|
195
|
+
sections[current_key] = "\n".join(buf).strip()
|
|
196
|
+
current_key = key
|
|
197
|
+
# Drop everything up to and including the first ":"
|
|
198
|
+
after_colon = (
|
|
199
|
+
stripped[stripped.index(":") + 1 :].strip()
|
|
200
|
+
if ":" in stripped
|
|
201
|
+
else ""
|
|
202
|
+
)
|
|
203
|
+
buf = [after_colon] if after_colon else []
|
|
204
|
+
matched = True
|
|
205
|
+
break
|
|
206
|
+
if not matched and current_key is not None:
|
|
207
|
+
buf.append(stripped)
|
|
208
|
+
|
|
209
|
+
if current_key is not None:
|
|
210
|
+
sections[current_key] = "\n".join(buf).strip()
|
|
211
|
+
|
|
212
|
+
return sections
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
def _parse_transform_step(name: str, source: str) -> dict:
|
|
216
|
+
tree = ast.parse(source)
|
|
217
|
+
|
|
218
|
+
# Docstrings live on the Transform subclass, not the module.
|
|
219
|
+
docstring = ast.get_docstring(tree) or ""
|
|
220
|
+
for node in ast.walk(tree):
|
|
221
|
+
if isinstance(node, ast.ClassDef):
|
|
222
|
+
class_doc = ast.get_docstring(node)
|
|
223
|
+
if class_doc:
|
|
224
|
+
docstring = class_doc
|
|
225
|
+
break
|
|
226
|
+
|
|
227
|
+
sections = _parse_docstring_sections(docstring)
|
|
228
|
+
return {
|
|
229
|
+
"name": name,
|
|
230
|
+
"step_input": sections.get("step_input", ""),
|
|
231
|
+
"step_output": sections.get("step_output", ""),
|
|
232
|
+
"step_field_map": sections.get("step_field_map", ""),
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
# ---------------------------------------------------------------------------
|
|
237
|
+
# Commands
|
|
238
|
+
# ---------------------------------------------------------------------------
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
def cmd_list() -> dict:
|
|
242
|
+
return {"connectors": _list_py_files(DEFAULTS_PATH)}
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
def cmd_connector(name: str) -> dict:
|
|
246
|
+
files = _list_py_files(DEFAULTS_PATH)
|
|
247
|
+
match = next((f for f in files if f["name"] == name), None)
|
|
248
|
+
if not match:
|
|
249
|
+
return {
|
|
250
|
+
"error": (
|
|
251
|
+
f"Connector '{name}' not found. "
|
|
252
|
+
"Run --list to see available connectors."
|
|
253
|
+
)
|
|
254
|
+
}
|
|
255
|
+
source = _fetch_text(match["download_url"])
|
|
256
|
+
schema = _parse_connector_schema(source)
|
|
257
|
+
schema["connector"] = name
|
|
258
|
+
return {"schema": schema}
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
def cmd_transforms() -> dict:
|
|
262
|
+
files = _list_py_files(TRANSFORMS_PATH)
|
|
263
|
+
return {
|
|
264
|
+
"transforms": [
|
|
265
|
+
_parse_transform_step(f["name"], _fetch_text(f["download_url"]))
|
|
266
|
+
for f in files
|
|
267
|
+
]
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
|
|
271
|
+
# ---------------------------------------------------------------------------
|
|
272
|
+
# Entry point
|
|
273
|
+
# ---------------------------------------------------------------------------
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
def main() -> None:
|
|
277
|
+
parser = argparse.ArgumentParser(
|
|
278
|
+
description="Fetch connection-auth-rules schema from the apollo-agent repo",
|
|
279
|
+
)
|
|
280
|
+
parser.add_argument("--list", action="store_true", help="List available connectors")
|
|
281
|
+
parser.add_argument(
|
|
282
|
+
"--connector", metavar="NAME", help="Fetch schema for a connector"
|
|
283
|
+
)
|
|
284
|
+
parser.add_argument(
|
|
285
|
+
"--transforms", action="store_true", help="Fetch available transform steps"
|
|
286
|
+
)
|
|
287
|
+
args = parser.parse_args()
|
|
288
|
+
|
|
289
|
+
if not (args.list or args.connector or args.transforms):
|
|
290
|
+
parser.print_help()
|
|
291
|
+
sys.exit(1)
|
|
292
|
+
|
|
293
|
+
result: dict = {}
|
|
294
|
+
|
|
295
|
+
try:
|
|
296
|
+
if args.list:
|
|
297
|
+
result.update(cmd_list())
|
|
298
|
+
|
|
299
|
+
if args.connector:
|
|
300
|
+
connector_result = cmd_connector(args.connector)
|
|
301
|
+
if "error" in connector_result:
|
|
302
|
+
print(json.dumps(connector_result, indent=2))
|
|
303
|
+
sys.exit(1)
|
|
304
|
+
result.update(connector_result)
|
|
305
|
+
|
|
306
|
+
if args.transforms:
|
|
307
|
+
result.update(cmd_transforms())
|
|
308
|
+
|
|
309
|
+
except urllib.error.HTTPError as exc:
|
|
310
|
+
print(json.dumps({"error": f"GitHub API error {exc.code}: {exc.reason}"}))
|
|
311
|
+
sys.exit(1)
|
|
312
|
+
except urllib.error.URLError as exc:
|
|
313
|
+
print(json.dumps({"error": f"Network error: {exc.reason}"}))
|
|
314
|
+
sys.exit(1)
|
|
315
|
+
|
|
316
|
+
print(json.dumps(result, indent=2))
|
|
317
|
+
|
|
318
|
+
|
|
319
|
+
if __name__ == "__main__":
|
|
320
|
+
main()
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Dependency Analysis
|
|
2
|
+
|
|
3
|
+
This is an official Ontoly Agent Skill. It is independently installable and teaches an agent how to use Ontoly for dependency analysis.
|
|
4
|
+
|
|
5
|
+
## Version
|
|
6
|
+
|
|
7
|
+
- Skill version: 1.0.0
|
|
8
|
+
- Minimum Ontoly version: 1.0.0
|
|
9
|
+
- Required capabilities: `FindDependencies`, `FindDependents`, `FindCycles`, `GraphStatistics`, `EvidencePack`
|
|
10
|
+
- Enhancement: LLM Enhancement
|
|
11
|
+
- Deprecated: no
|
|
12
|
+
|
|
13
|
+
## Install
|
|
14
|
+
|
|
15
|
+
Install this skill with any Agent Skills compatible installer that supports `SKILL.md` directories, or copy this folder into your agent skills directory.
|
|
16
|
+
|
|
17
|
+
## Use
|
|
18
|
+
|
|
19
|
+
Ask the agent a task such as:
|
|
20
|
+
|
|
21
|
+
> Which packages depend on this module?
|
|
22
|
+
|
|
23
|
+
The agent should build or verify the Ontoly graph, use MCP capabilities, cite evidence, and only inspect files as a fallback.
|
|
24
|
+
|
|
25
|
+
## Public Docs
|
|
26
|
+
|
|
27
|
+
- [Agent Skills](https://ontoly.xyz/docs/agent-skills)
|
|
28
|
+
- [Skills Overview](https://ontoly.xyz/docs/skills-overview)
|
|
29
|
+
- [MCP](https://ontoly.xyz/docs/mcp)
|
|
30
|
+
- [Capabilities](https://ontoly.xyz/docs/capabilities)
|
|
31
|
+
- [Skills Validation](https://ontoly.xyz/docs/skills-validation)
|
|
32
|
+
|
|
33
|
+
## Shared References
|
|
34
|
+
|
|
35
|
+
This skill depends on the shared Ontoly workflow in [reference/workflow.md](reference/workflow.md).
|
|
36
|
+
|
|
37
|
+
## Learn more
|
|
38
|
+
|
|
39
|
+
- Documentation: https://ontoly.xyz/docs
|
|
40
|
+
- This skill on the web: https://ontoly.xyz/skills#dependency-analysis
|
|
41
|
+
- All Ontoly Agent Skills: https://ontoly.xyz/skills
|
|
42
|
+
- Install via skills.sh: https://www.skills.sh/?q=0xsarwagya/ontoly
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: dependency-analysis
|
|
3
|
+
description: Analyze internal and package dependencies using Ontoly graph traversal.
|
|
4
|
+
Use when asked which modules, packages, services, or files depend on each other.
|
|
5
|
+
license: AGPL-3.0-only
|
|
6
|
+
compatibility: Portable Agent Skills format; requires Ontoly CLI and MCP-capable or
|
|
7
|
+
CLI-capable coding agent.
|
|
8
|
+
metadata:
|
|
9
|
+
ontoly.skill.version: 1.3.3
|
|
10
|
+
ontoly.min.version: 1.3.3
|
|
11
|
+
ontoly.capabilities: FindDependencies, FindDependents, FindCycles, GraphStatistics,
|
|
12
|
+
EvidencePack
|
|
13
|
+
ontoly.category: dependencies
|
|
14
|
+
ontoly.enhancement: LLM Enhancement
|
|
15
|
+
ontoly.deprecated: 'false'
|
|
16
|
+
source_repo: 0xsarwagya/ontoly
|
|
17
|
+
source_type: community
|
|
18
|
+
source: community
|
|
19
|
+
date_added: '2026-09-21'
|
|
20
|
+
risk: unknown
|
|
21
|
+
---
|
|
22
|
+
## When to Use
|
|
23
|
+
- Use when this upstream workflow matches the user's stated goal.
|
|
24
|
+
- Use when the task requires the procedures documented in this skill.
|
|
25
|
+
|
|
26
|
+
# Dependency Analysis
|
|
27
|
+
|
|
28
|
+
Use this skill when the user asks for dependency analysis using Ontoly evidence.
|
|
29
|
+
|
|
30
|
+
## Required Workflow
|
|
31
|
+
|
|
32
|
+
Follow [the shared Ontoly workflow. Also read [graph evidence rules, [MCP usage, [best practices, and [fallback rules when the task requires detail.
|
|
33
|
+
|
|
34
|
+
## Ontoly Capabilities
|
|
35
|
+
|
|
36
|
+
Use these capabilities first: `FindDependencies`, `FindDependents`, `FindCycles`, `GraphStatistics`, `EvidencePack`.
|
|
37
|
+
|
|
38
|
+
## Output Contract
|
|
39
|
+
|
|
40
|
+
Return:
|
|
41
|
+
|
|
42
|
+
- answer or plan
|
|
43
|
+
- capabilities invoked
|
|
44
|
+
- graph evidence with node ids, edge types, source spans, and graph hash when available
|
|
45
|
+
- confidence: high, medium, or low
|
|
46
|
+
- fallback reason if repository files were inspected
|
|
47
|
+
|
|
48
|
+
## Boundaries
|
|
49
|
+
|
|
50
|
+
Do not implement compiler, query, MCP, SDK, or business logic in the skill. Do not search repository files until Ontoly cannot answer or evidence must be confirmed.
|
|
51
|
+
|
|
52
|
+
## Resources
|
|
53
|
+
|
|
54
|
+
- [Examples
|
|
55
|
+
- [Prompt template
|
|
56
|
+
- [Capability notes
|
|
57
|
+
|
|
58
|
+
## Learn more
|
|
59
|
+
|
|
60
|
+
- Documentation: https://ontoly.xyz/docs
|
|
61
|
+
- This skill on the web: https://ontoly.xyz/skills#dependency-analysis
|
|
62
|
+
- All Ontoly Agent Skills: https://ontoly.xyz/skills
|
|
63
|
+
- Install via skills.sh: https://www.skills.sh/?q=0xsarwagya/ontoly
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
## Examples
|
|
67
|
+
|
|
68
|
+
```text
|
|
69
|
+
User: Apply this skill to my current task.
|
|
70
|
+
Assistant: Follow the workflow in this skill, cite limitations, and ask before risky steps.
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Limitations
|
|
74
|
+
|
|
75
|
+
- Imported upstream skill; verify credentials, permissions, and safety boundaries before execution.
|
|
76
|
+
- Does not replace environment-specific validation, testing, or maintainer review.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Dependency Analysis Examples
|
|
2
|
+
|
|
3
|
+
Each example is graph-first and MCP-first.
|
|
4
|
+
|
|
5
|
+
| Repository | Questions | Expected workflow | Capabilities invoked | Expected evidence | Expected answer |
|
|
6
|
+
| --- | --- | --- | --- | --- | --- |
|
|
7
|
+
| Ovok Core | Trace the login flow through the NestJS auth controller. | Follow shared workflow, run `EvidencePack` first, then `FindDependencies` then `FindDependents` then `FindCycles` then `GraphStatistics`, inspect files only if graph evidence is missing. | `EvidencePack`, `FindDependencies`, `FindDependents`, `FindCycles`, `GraphStatistics` | controller, route, service, dependency-injection edges; graph hash; confidence. | A deterministic dependency report with direct/transitive edges, cycles, and confidence. |
|
|
8
|
+
| Ghost | Explain the package entrypoint and public API surface. | Follow shared workflow, run `EvidencePack` first, then `FindDependencies` then `FindDependents` then `FindCycles` then `GraphStatistics`, inspect files only if graph evidence is missing. | `EvidencePack`, `FindDependencies`, `FindDependents`, `FindCycles`, `GraphStatistics` | package, exports, functions, interfaces; graph hash; confidence. | A deterministic dependency report with direct/transitive edges, cycles, and confidence. |
|
|
9
|
+
| durable-local | Find storage APIs and consumers before a refactor. | Follow shared workflow, run `EvidencePack` first, then `FindDependencies` then `FindDependents` then `FindCycles` then `GraphStatistics`, inspect files only if graph evidence is missing. | `EvidencePack`, `FindDependencies`, `FindDependents`, `FindCycles`, `GraphStatistics` | functions, interfaces, dependents, configuration; graph hash; confidence. | A deterministic dependency report with direct/transitive edges, cycles, and confidence. |
|
|
10
|
+
| 0xsarwagya | Summarize workspace packages and package dependencies. | Follow shared workflow, run `EvidencePack` first, then `FindDependencies` then `FindDependents` then `FindCycles` then `GraphStatistics`, inspect files only if graph evidence is missing. | `EvidencePack`, `FindDependencies`, `FindDependents`, `FindCycles`, `GraphStatistics` | workspace, packages, framework nodes, dependency edges; graph hash; confidence. | A deterministic dependency report with direct/transitive edges, cycles, and confidence. |
|
|
11
|
+
| Innosphere | Identify application modules and request ownership. | Follow shared workflow, run `EvidencePack` first, then `FindDependencies` then `FindDependents` then `FindCycles` then `GraphStatistics`, inspect files only if graph evidence is missing. | `EvidencePack`, `FindDependencies`, `FindDependents`, `FindCycles`, `GraphStatistics` | controllers, modules, routes, services; graph hash; confidence. | A deterministic dependency report with direct/transitive edges, cycles, and confidence. |
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# Agent Best Practices
|
|
2
|
+
|
|
3
|
+
- Keep the answer graph-first and concise.
|
|
4
|
+
- Separate measured graph facts from inference.
|
|
5
|
+
- Prefer capability output over source search.
|
|
6
|
+
- Include confidence: high when graph nodes and relationships directly answer the question, medium when evidence is partial, low when fallback file inspection was required.
|
|
7
|
+
- Never generate SDKs, refactors, or security claims from the skill itself. The skill may plan workflows, but Ontoly remains the source of truth.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Dependency Analysis Capability Notes
|
|
2
|
+
|
|
3
|
+
Primary capabilities: `FindDependencies`, `FindDependents`, `FindCycles`, `GraphStatistics`, `EvidencePack`.
|
|
4
|
+
|
|
5
|
+
Use [../reference/mcp.md](../reference/mcp.md) for common capability behavior and fallback CLI equivalents.
|
|
6
|
+
|
|
7
|
+
## Required Evidence
|
|
8
|
+
|
|
9
|
+
- capability name
|
|
10
|
+
- graph hash
|
|
11
|
+
- node ids and types
|
|
12
|
+
- relationship types and direction
|
|
13
|
+
- source spans when present
|
|
14
|
+
- confidence
|
|
15
|
+
|
|
16
|
+
## Compatibility
|
|
17
|
+
|
|
18
|
+
- Skill version: 1.0.0
|
|
19
|
+
- Minimum Ontoly version: 1.0.0
|
|
20
|
+
- Deprecation status: active
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Fallbacks
|
|
2
|
+
|
|
3
|
+
Fallbacks are allowed only after Ontoly is insufficient. Valid fallback reasons:
|
|
4
|
+
|
|
5
|
+
- graph artifact missing and build fails
|
|
6
|
+
- relevant capability unavailable
|
|
7
|
+
- graph trust below the task threshold
|
|
8
|
+
- node is ambiguous or absent
|
|
9
|
+
- source quote is needed to confirm a public answer
|
|
10
|
+
|
|
11
|
+
When falling back, state the reason and keep inspection narrow: one file, one symbol, or one source span when possible.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Software Graph Evidence
|
|
2
|
+
|
|
3
|
+
Use Software Graph evidence as the primary source of truth. Prefer deterministic identifiers over prose names.
|
|
4
|
+
|
|
5
|
+
Evidence fields to capture:
|
|
6
|
+
|
|
7
|
+
- graph hash
|
|
8
|
+
- capability invoked
|
|
9
|
+
- node id and node type
|
|
10
|
+
- edge type and direction
|
|
11
|
+
- source span when present
|
|
12
|
+
- diagnostic codes when relevant
|
|
13
|
+
- confidence and reason for confidence
|
|
14
|
+
|
|
15
|
+
Do not infer relationships that are absent from the graph. You may make a clearly labeled inference only after stating the graph evidence that supports it.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Ontoly MCP Usage
|
|
2
|
+
|
|
3
|
+
Use Ontoly MCP capabilities before searching files. Common capability groups:
|
|
4
|
+
|
|
5
|
+
- Architecture: `ExplainArchitecture`, `GraphStatistics`
|
|
6
|
+
- Lookup: `FindNode`, `FindFunction`, `InspectFile`, `InspectModule`, `InspectClass`, `InspectFunction`
|
|
7
|
+
- Dependencies: `FindDependencies`, `FindDependents`, `FindCycles`, `ImpactAnalysis`
|
|
8
|
+
- Requests: `TraceRequestLifecycle`, `FindResponsibleFunction`, `TraceExecution`
|
|
9
|
+
- Security: `FindAuthenticationFlow`, `FindConfigurationUsage`
|
|
10
|
+
- Configuration: `FindConfiguration`, `FindConfigurationUsage`
|
|
11
|
+
- Static analysis: `FindDeadCode`, `FindUnusedFeature`, `FindEntrypoints`
|
|
12
|
+
- Evidence packs: `EvidencePack`
|
|
13
|
+
|
|
14
|
+
If an agent cannot call MCP directly, use the nearest CLI command such as `ontoly evidence`, `ontoly report`, `ontoly query`, `ontoly trace`, or `ontoly inspect`.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Ontoly Agent Skill Standard Workflow
|
|
2
|
+
|
|
3
|
+
Every Ontoly skill follows this workflow. Skills teach orchestration only; Ontoly provides the software understanding.
|
|
4
|
+
|
|
5
|
+
LLM Enhancement is mandatory every time Ontoly is used by an LLM. An LLM-facing workflow must use an Ontoly skill or equivalent installed workflow that declares `ontoly.enhancement: "LLM Enhancement"` and preserves graph-first evidence, confidence, and fallback rules.
|
|
6
|
+
|
|
7
|
+
1. Verify that an Ontoly graph exists at `.ontoly/SoftwareGraph.json`.
|
|
8
|
+
2. If the graph is missing or stale, run `ontoly build .`.
|
|
9
|
+
3. Check graph trust with `ontoly coverage .` or `ontoly stats . --json`.
|
|
10
|
+
4. Prefer Ontoly MCP by starting or connecting to `ontoly mcp`.
|
|
11
|
+
5. Query `EvidencePack` first for compact graph context, then the capability that matches the task before reading files.
|
|
12
|
+
6. Inspect repository files only when Ontoly cannot answer, confidence is low, or source snippets are needed for confirmation.
|
|
13
|
+
7. Always cite evidence: node ids, edge ids or relationship types, source spans, graph hash, capability name, and confidence.
|
|
14
|
+
|
|
15
|
+
When evidence is incomplete, say what Ontoly proved, what remains unknown, and which fallback check was used.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Dependency Review
|
|
2
|
+
|
|
3
|
+
Repository: {{repository}}
|
|
4
|
+
Question: {{question}}
|
|
5
|
+
|
|
6
|
+
## Workflow
|
|
7
|
+
|
|
8
|
+
1. Verify `.ontoly/SoftwareGraph.json`.
|
|
9
|
+
2. Build with `ontoly build .` if missing.
|
|
10
|
+
3. Check trust with `ontoly coverage .`.
|
|
11
|
+
4. Use Ontoly MCP capabilities: `FindDependencies`, `FindDependents`, `FindCycles`, `GraphStatistics`.
|
|
12
|
+
5. Inspect files only if Ontoly cannot answer.
|
|
13
|
+
|
|
14
|
+
## Response
|
|
15
|
+
|
|
16
|
+
- Summary:
|
|
17
|
+
- Capabilities invoked:
|
|
18
|
+
- Evidence:
|
|
19
|
+
- Confidence:
|
|
20
|
+
- Fallbacks used:
|
|
21
|
+
- Recommended next action:
|