empty-repos
Copilot instructions8 starsChanged 12 months agoMITView on GitHub
The Empty Repos Workflow is a GitHub Actions workflow that scans organizations for empty repositories and README-only repositories, generating monthly reports as GitHub issues. Always reference these instructions first and fallback to search or bash commands only when you encounter unexpected information that does not match the info here.
The file
Show its rules and text
We split this copilot-instructions.md into the rules it gives an agent
19 rules. About 0 are common, 10 are distinctive, and 9 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈10
Distinctive · estimate
This author's own choices. Worth a look.
9
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 5
Always reference these instructions first and fallback to search or bash commands only when you encounter unexpected information that does …
- Distinctive: line 25
Expected warnings: Document start missing, line length warnings are normal
- Very specific: line 26
Test workflow JavaScript logic: Create test script and run with node /tmp/test-workflow-logic.js
- Very specific: line 40
CRITICAL: Always test JavaScript logic changes by creating a test script in /tmp/ before modifying the workflow
- Distinctive: line 41
Validation scenario: Create mock repository data and test filtering logic for empty/README-only detection
- Very specific: line 52
Before changes: Run yamllint .github/workflows/empty-repos.yml to check current syntax
- Very specific: line 53
Test logic changes: Create test script in /tmp/ using Node.js to validate JavaScript modifications
- Distinctive: line 55
Validation: Test with different mock data scenarios
- Distinctive: line 74
ALWAYS: test JavaScript logic modifications with a local test script before deployment
- Distinctive: line 75
CRITICAL: Test complete workflow scenarios including:
- Very specific: line 82
Git validation: Ensure only intended files are committed (exclude /tmp/ test files)
- Distinctive: line 87
yamllint warnings: Document start and line length warnings are acceptable
- Distinctive: line 88
YAML syntax errors: Check indentation and special characters in workflow file
- Distinctive: line 89
JavaScript errors: Test logic modifications in isolation before workflow integration
- Very specific: line 94
Manual triggers: Use GitHub Actions UI or gh workflow run (requires authentication)
- Very specific: line 137
Syntax errors: Run yamllint .github/workflows/empty-repos.yml for validation
- Very specific: line 138
Logic errors: Test JavaScript modifications with mock data in /tmp/ scripts
- Distinctive: line 139
GitHub API errors: Check organization permissions and token scopes
- Very specific: line 143
No tests to run: Create validation scripts in /tmp/ for testing logic changes
≈ “Common” is an estimate: at least 1 in 5 of the 1,644 Copilot instructions files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Empty Repos Workflow
The Empty Repos Workflow is a GitHub Actions workflow that scans organizations for empty repositories and README-only repositories, generating monthly reports as GitHub issues.
Always reference these instructions first and fallback to search or bash commands only when you encounter unexpected information that does not match the info here.
Working Effectively
Repository Structure
.github/workflows/empty-repos.yml- The main GitHub Actions workflow file- Documentation files - README.md, CONTRIBUTING.md, CODE_OF_CONDUCT.md, SECURITY.md, SUPPORT.md
- Configuration files - CODEOWNERS, LICENSE
- No application code - This is a pure GitHub Actions workflow repository
Prerequisites and Setup
- Install required tools:
- Node.js v20+ is available:
node --version - npm 10+ is available:
npm --version - GitHub CLI 2.76+ is available:
gh --version - yamllint is available:
yamllint --version
- Node.js v20+ is available:
Validation Commands
- Validate workflow YAML syntax:
yamllint .github/workflows/empty-repos.yml- TIMING: Takes 2-3 seconds. NEVER CANCEL.
- Expected warnings: Document start missing, line length warnings are normal
- Test workflow JavaScript logic: Create test script and run with
node /tmp/test-workflow-logic.js- TIMING: Takes 1-2 seconds. NEVER CANCEL.
- Check repository status:
git status && git log --oneline -5- TIMING: Takes 1-2 seconds. NEVER CANCEL.
Working with the Workflow
- Core workflow file:
.github/workflows/empty-repos.yml - Key components:
- Scheduled execution:
cron: '0 0 1 * *'(1st of every month) - Manual trigger with visibility options: all, public, private
- GitHub API scanning logic using
actions/github-script@v6 - Issue creation with markdown table reports
- Scheduled execution:
Testing and Validation
- CRITICAL: Always test JavaScript logic changes by creating a test script in
/tmp/before modifying the workflow - Validation scenario: Create mock repository data and test filtering logic for empty/README-only detection
- Required test cases:
- Empty repositories (no contents)
- README-only repositories (only README files)
- Normal repositories (multiple files)
- Visibility filtering (all/public/private)
- Archived repository exclusion
Common Tasks
Modifying the Workflow
- Before changes: Run
yamllint .github/workflows/empty-repos.ymlto check current syntax - Test logic changes: Create test script in
/tmp/using Node.js to validate JavaScript modifications - After changes: Re-run yamllint to ensure valid YAML syntax
- Validation: Test with different mock data scenarios
Testing the JavaScript Logic
# Create test script (example provided in validation)
node /tmp/test-workflow-logic.js- TIMING: 1-2 seconds execution. NEVER CANCEL.
- Expected output: Mock repository categorization and report generation
Repository Operations
- Check workflow syntax:
yamllint .github/workflows/empty-repos.yml - View workflow structure:
cat .github/workflows/empty-repos.yml - Git operations: Standard git commands work normally
- No build process: This repository contains only configuration and documentation
Validation
- ALWAYS validate YAML syntax with yamllint before committing workflow changes
- ALWAYS test JavaScript logic modifications with a local test script before deployment
- CRITICAL: Test complete workflow scenarios including:
- Empty repository detection logic
- README-only repository filtering
- Visibility-based repository filtering
- Report generation and formatting
- NO UI testing required: This is a GitHub Actions workflow with no user interface
- Manual validation: Review generated mock reports to ensure proper markdown formatting
- Git validation: Ensure only intended files are committed (exclude
/tmp/test files)
Common Issues and Solutions
Workflow Validation
- yamllint warnings: Document start and line length warnings are acceptable
- YAML syntax errors: Check indentation and special characters in workflow file
- JavaScript errors: Test logic modifications in isolation before workflow integration
GitHub Actions Context
- Organization scanning: Requires appropriate GitHub token permissions
- API rate limits: Built-in pagination handles large organization scans
- Manual triggers: Use GitHub Actions UI or
gh workflow run(requires authentication)
Timing Expectations
- yamllint validation: 2-3 seconds - NEVER CANCEL
- JavaScript logic testing: 1-2 seconds - NEVER CANCEL
- Git operations: 1-5 seconds - NEVER CANCEL
- File editing: Instantaneous - NEVER CANCEL
- Workflow execution (when run in GitHub): 30 seconds to 5 minutes depending on organization size - NEVER CANCEL
File Locations
Repository Root
.
├── .github/
│ └── workflows/
│ └── empty-repos.yml # Main workflow file
├── CODEOWNERS # Code ownership definitions
├── CODE_OF_CONDUCT.md # Community guidelines
├── CONTRIBUTING.md # Contribution instructions
├── LICENSE # MIT license
├── README.md # Repository documentation
├── SECURITY.md # Security policy
└── SUPPORT.md # Support informationKey Files to Monitor
- Primary:
.github/workflows/empty-repos.yml- All workflow logic - Documentation: README.md - Usage instructions and examples
- Configuration: CODEOWNERS - Maintainer assignments
Available Tools Output
node --version # v20.19.4
npm --version # 10.8.2
gh --version # gh version 2.76.2
yamllint --version # yamllint 1.xTroubleshooting
Workflow Issues
- Syntax errors: Run
yamllint .github/workflows/empty-repos.ymlfor validation - Logic errors: Test JavaScript modifications with mock data in
/tmp/scripts - GitHub API errors: Check organization permissions and token scopes
Development Workflow
- No builds required: This repository contains only configuration files
- No tests to run: Create validation scripts in
/tmp/for testing logic changes - No dependencies: Workflow uses built-in GitHub Actions and
actions/github-script
Remember: This is a GitHub Actions workflow repository. Focus on workflow syntax validation and JavaScript logic testing rather than traditional application development processes.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

