Discover repositories in an organization for sync operations
Discovers repositories in an organization for sync operations, excluding the codex repo and applying include/exclude patterns. Used by org-syncer to enumerate repos via the fractary-repo plugin's GitHub/GitLab API.
/plugin marketplace add fractary/claude-plugins/plugin install fractary-codex@fractaryThis skill inherits all available tools. When active, it can use any tool Claude has access to.
scripts/discover-repos.shYour responsibility is to discover repositories in an organization that should be synced with the codex. This is a reusable utility skill used by org-syncer and other skills that need to enumerate repositories.
You provide:
You use the fractary-repo plugin for GitHub/GitLab API calls. You NEVER use gh/git commands directly. </CONTEXT>
<CRITICAL_RULES> IMPORTANT: FOCUS ON DISCOVERY ONLY
IMPORTANT: USE REPO PLUGIN
IMPORTANT: EXCLUDE CODEX REPOSITORY
{
"operation": "discover",
"organization": "<github-org-name>",
"codex_repo": "<codex-repo-name>",
"exclude_patterns": ["pattern1", "pattern2"],
"include_patterns": ["pattern1", "pattern2"],
"limit": 100
}
Parameters:
operation: Always "discover"organization: GitHub/GitLab organization name (required)codex_repo: Codex repository name to exclude (required)exclude_patterns: Optional array of glob patterns for repos to excludeinclude_patterns: Optional array of glob patterns for repos to include (default: all)limit: Maximum repositories to return (default: 100, max: 1000)
</INPUTS>
Output:
šÆ STARTING: Repository Discovery
Organization: <organization>
Codex Repository: <codex_repo> (will be excluded)
Exclude Patterns: <patterns or "none">
Include Patterns: <patterns or "all">
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
Check that required parameters are present:
organization must be non-emptycodex_repo must be non-emptyIf validation fails:
Execute the discovery script:
./skills/repo-discoverer/scripts/discover-repos.sh \
--organization "<organization>" \
--codex-repo "<codex_repo>" \
--exclude "<exclude_patterns>" \
--include "<include_patterns>" \
--limit <limit>
The script will:
Script Output Format:
{
"success": true,
"repositories": [
{
"name": "repo-name",
"full_name": "org/repo-name",
"url": "https://github.com/org/repo-name",
"default_branch": "main",
"visibility": "public"
},
...
],
"total": 42,
"filtered": 1,
"error": null
}
Parse the JSON output from the script.
If success is false:
If success is true:
Output:
ā
COMPLETED: Repository Discovery
Total Repositories: <total>
Filtered Out: <filtered> (including codex repo)
Discovered: <count>
Repositories:
- <repo 1>
- <repo 2>
- <repo 3>
... (list first 10, indicate if more)
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
Next: Use this list for sync operations
Return the JSON object from the script for downstream processing. </WORKFLOW>
<COMPLETION_CRITERIA> This skill is complete when:
ā Discovery succeeded:
ā Discovery failed:
ā Output provided:
Return this JSON structure:
{
"status": "success",
"organization": "<organization>",
"codex_repo": "<codex_repo>",
"repositories": [
{
"name": "repo-name",
"full_name": "org/repo-name",
"url": "https://github.com/org/repo-name",
"default_branch": "main"
},
...
],
"total_discovered": 42,
"total_filtered": 1
}
Return this JSON structure:
{
"status": "failure",
"error": "Error message",
"context": "What was being attempted",
"resolution": "How to fix it"
}
</OUTPUTS>
<ERROR_HANDLING> <SCRIPT_FAILURE> If discover-repos.sh fails:
Common failures:
<VALIDATION_FAILURE> If input validation fails:
<NO_REPOSITORIES> If zero repositories discovered (after filtering):
Keep output concise but informative. </DOCUMENTATION>
Create employment contracts, offer letters, and HR policy documents following legal best practices. Use when drafting employment agreements, creating HR policies, or standardizing employment documentation.
Implement GDPR-compliant data handling with consent management, data subject rights, and privacy by design. Use when building systems that process EU personal data, implementing privacy controls, or conducting GDPR compliance reviews.