skills-getting-started-with-github-copilot
Copilot instructions0 starsChanged 12 months agoMITView on GitHub
This is a web application for managing extracurricular activities at Mergington High School. Students can browse available activities and sign up using their school email addresses. Adding a new activity: - Add entry to activities dictionary in app.py - No frontend changes needed (automatically populated) Adding a new API endpoint: - Define route in app.py with appropriate decorator (@app.get, @app.post) - Update frontend JavaScript to call new endpoint Adding validation: - Backend: Use Pydantic models or manual validation - Frontend:…
- Installs packages
The file
Show its rules and text
We split this copilot-instructions.md into the rules it gives an agent
26 rules. About 0 are common, 17 are distinctive, and 9 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈17
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
- Very specific: line 50
No Framework: Use plain JavaScript, avoid adding React/Vue/Angular
- Very specific: line 51
API Communication: Use native fetch() API with async/await
- Very specific: line 52
DOM Manipulation: Use querySelector, createElement, appendChild
- Very specific: line 53
Event Handling: Add listeners via addEventListener
- Distinctive: line 54
Styling: Use CSS classes, avoid inline styles
- Distinctive: line 60
Use type hints for function parameters and return values
- Distinctive: line 61
Follow PEP 8 style guide
- Distinctive: line 62
Use async/await for async endpoints (if needed in future)
- Very specific: line 64
Keep business logic in app.py (simple monolithic structure)
- Distinctive: line 68
Use ES6+ syntax (const/let, arrow functions, template literals)
- Distinctive: line 83
Use class selectors over IDs for styling
- Very specific: line 96
Backend changes: Update src/app.py with new endpoints or logic
- Very specific: line 98
Styling: Add classes to src/static/styles.css
- Very specific: line 99
Data changes: Update the activities dictionary structure if needed
- Very specific: line 104
Add entry to activities dictionary in app.py
- Distinctive: line 105
No frontend changes needed (automatically populated)
- Distinctive: line 109
Update frontend JavaScript to call new endpoint
- Distinctive: line 117
Email Format: Must be valid email (validated client-side)
- Distinctive: line 119
Participants: No duplicate checking currently implemented
- Distinctive: line 126
No database (in-memory storage only)
- Distinctive: line 127
No email domain validation (@mergington.edu)
- Distinctive: line 128
No duplicate signup prevention
- Distinctive: line 135
When suggesting improvements, consider:
- Distinctive: line 170
Test signup with various email formats
- Distinctive: line 171
Verify activity list displays correctly
- Distinctive: line 172
Check error handling for invalid activity names
≈ “Common” is an estimate: at least 1 in 5 of the 3,950 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
Copilot Instructions for Mergington High School Activities Platform
Project Overview
This is a web application for managing extracurricular activities at Mergington High School. Students can browse available activities and sign up using their school email addresses.
Technology Stack
- Backend: Python 3.x with FastAPI framework
- Frontend: Vanilla JavaScript (ES6+), HTML5, CSS3
- Server: Uvicorn ASGI server
- Data Storage: In-memory Python dictionary (non-persistent)
Project Structure
src/
├── app.py # FastAPI application with REST endpoints
└── static/
├── index.html # Main HTML page
├── app.js # Frontend JavaScript logic
└── styles.css # Application stylingArchitecture Guidelines
Backend (FastAPI)
- Entry Point:
src/app.py - API Endpoints:
GET /— Redirects to index.htmlGET /activities— Returns all activities as JSONPOST /activities/{activity_name}/signup?email=<email>— Registers a student
- Data Model: Activities stored as nested dictionary with structure:
{ "Activity Name": { "description": str, "schedule": str, "max_participants": int, "participants": list[str] } } - CORS: Enabled with
CORSMiddlewarefor all origins (development setting) - Static Files: Mounted at
/staticroute, served fromsrc/staticdirectory
Frontend (Vanilla JavaScript)
- No Framework: Use plain JavaScript, avoid adding React/Vue/Angular
- API Communication: Use native
fetch()API with async/await - DOM Manipulation: Use
querySelector,createElement,appendChild - Event Handling: Add listeners via
addEventListener - Styling: Use CSS classes, avoid inline styles
Coding Conventions
Python/FastAPI
- Use type hints for function parameters and return values
- Follow PEP 8 style guide
- Use async/await for async endpoints (if needed in future)
- HTTP exceptions via
fastapi.HTTPException - Keep business logic in
app.py(simple monolithic structure)
JavaScript
- Use ES6+ syntax (const/let, arrow functions, template literals)
- Async functions with try/catch for error handling
- Clear function names:
loadActivities(),handleSignup(),showMessage() - Display user feedback via
#messageelement - Auto-hide success messages after 5 seconds
HTML
- Semantic HTML5 elements (
<header>,<main>,<section>,<footer>) - Form validation attributes (
required,type="email") - Accessibility: proper
<label>associations withforattribute - IDs for JavaScript hooks:
#activities-list,#signup-form,#message
CSS
- Use class selectors over IDs for styling
- Maintain consistent color scheme:
- Primary:
#1a237e(dark blue) - Accent:
#ffa000(amber) - Success:
#4caf50(green) - Error:
#f44336(red)
- Primary:
- Mobile-first responsive design
- Utility classes:
.hiddenfor visibility toggling
Development Practices
When Adding Features
- Backend changes: Update
src/app.pywith new endpoints or logic - Frontend changes: Modify
src/static/app.jsfor new UI behavior - Styling: Add classes to
src/static/styles.css - Data changes: Update the
activitiesdictionary structure if needed
Common Tasks
Adding a new activity:
- Add entry to
activitiesdictionary inapp.py - No frontend changes needed (automatically populated)
Adding a new API endpoint:
- Define route in
app.pywith appropriate decorator (@app.get,@app.post) - Update frontend JavaScript to call new endpoint
Adding validation:
- Backend: Use Pydantic models or manual validation
- Frontend: Add HTML5 attributes or JavaScript checks
Data Constraints
- Email Format: Must be valid email (validated client-side)
- Activity Names: Case-sensitive, must match exactly
- Participants: No duplicate checking currently implemented
- Capacity:
max_participantsfield exists but not enforced - Persistence: Data resets on server restart (in-memory only)
Known Limitations
- No authentication/authorization
- No database (in-memory storage only)
- No email domain validation (@mergington.edu)
- No duplicate signup prevention
- No capacity enforcement
- No admin interface
- No logging infrastructure
Future Considerations
When suggesting improvements, consider:
- Azure Cosmos DB for persistent storage (if asked about databases)
- Pydantic models for request/response validation
- Email domain validation for @mergington.edu
- Duplicate signup prevention by email
- Capacity checking before signup
- Admin endpoints for activity management
- Logging with Python's logging module
Demo/Tutorial Context
This project is part of a GitHub Copilot learning exercise. Focus on:
- Clear, readable code over complex optimizations
- Educational comments when appropriate
- Following existing patterns and conventions
- Incremental improvements rather than complete rewrites
Running the Application
# Activate virtual environment (Windows)
demoenv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Run server
uvicorn src.app:app --reload
# Access at http://localhost:8000Testing Approach
- Manual testing via browser
- Test signup with various email formats
- Verify activity list displays correctly
- Check error handling for invalid activity names
- Validate responsive design on different screen sizes
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.

