assistant-rocky-lti-assist
Skill9 starsChanged 8 months agoMITView on GitHub
Coding assistant for the Rocky-LTI project — a Canvas LTI 1.3 integration with an AI-powered educational agent. Use when working on FastAPI endpoints, MCP server components, SQLAlchemy models, Alembic migrations, Azure Functions workers, React/TypeScript frontend, or LTI/OAuth authentication flows in this codebase.
In this repository31 other files it gives its agents.
- git-workflow-releaseSkill
- skill-authoring-generalSkill
- git-workflow-releaseSkill
- skill-authoring-generalSkill
- accessibility-generalSkill
- accessibility-react-nativeSkill
- architecture-generalSkill
- architecture-pythonSkill
- assistant-ucd-mobileSkill
- ci-cd-github-actionsSkill
- code-review-generalSkill
- code-review-pythonSkill
- code-review-typescriptSkill
- data-science-pythonSkill
- design-frontendSkill
- documentation-projectSkill
- documentation-readmeSkill
- git-workflow-generalSkill
- git-workflow-monorepoSkill
- git-workflow-pr-generatorSkill
- git-workflow-releaseSkill
- infrastructure-terraformSkill
- package-management-pythonSkill
- project-management-jiraSkill
- refactoring-typescriptSkill
- security-generalSkill
- skill-authoring-generalSkill
- testing-generalSkill
- testing-javaSkill
- testing-pythonSkill
- testing-typescriptSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. About 0 are common, 6 are distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 93
Always use async SQLAlchemy patterns
- Very specific: line 99
Run: uv run pytest from lti/backend/agent/
- Very specific: line 114
Add route in appropriate api/<domain>/router.py
- Very specific: line 117
Write async tests in tests/
- Very specific: line 122
Add Pydantic types to canvas_mcp/models/
- Very specific: line 125
Add SQLAlchemy model to lti/backend/db/src/canvas_lti_db/
- Distinctive: line 131
Use React Query for data fetching
- Very specific: line 137
Use model_validator, field_validator (not v1 @validator)
- Very specific: line 138
Use model_dump() not .dict()
- Distinctive: line 144
Prefer async/await for all I/O
- Distinctive: line 145
Keep routers thin — delegate to services
- Very specific: line 146
Use dependency injection (Depends) for DB sessions, auth
- Distinctive: line 148
Write tests for new endpoints and services
- Distinctive: line 149
Follow existing module structure — don't create new top-level packages without discussion
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill 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
Rocky-LTI Coding Assistant
Provides project-aware coding guidance for the Rocky-LTI Canvas integration.
Project Overview
Rocky-LTI is a Canvas LMS integration using LTI 1.3 that exposes an AI agent (Rocky) to students and instructors. The AI agent is powered via Model Context Protocol (MCP), with Canvas course data surfaced as MCP resources and tools.
Monorepo Structure
rocky-lti/
├── lti/
│ ├── backend/
│ │ ├── agent/ # FastAPI server + MCP (PRIMARY backend)
│ │ │ ├── src/
│ │ │ │ ├── app.py # FastAPI entrypoint
│ │ │ │ ├── api/ # Routes, models, services
│ │ │ │ ├── canvas_mcp/ # MCP server (servers, services, classes, models)
│ │ │ │ └── env.py # Pydantic settings
│ │ │ ├── tests/ # pytest-asyncio tests
│ │ │ └── alembic/ # DB migrations (agent-side)
│ │ ├── db/ # Shared SQLAlchemy models package
│ │ │ └── src/canvas_lti_db/
│ │ └── workers/ # Azure Functions (async tasks)
│ ├── setup/ # LTI tool registration scripts
│ └── web/
│ ├── lti-frontend/ # Production React 19 + TypeScript app
│ └── lti-test-app/ # Dev/test Vite app
├── packages/
│ ├── rocky-chat/ # Shared npm chat component
│ └── rocky-chat-next/ # Next.js variant
└── infrastructure/terraform/ # Azure IaCTech Stack & Conventions
Python Backend
- Runtime: Python 3.13, managed exclusively with
uv - Framework: FastAPI with async/await throughout
- ORM: SQLAlchemy (async) + asyncpg (PostgreSQL)
- MCP: FastMCP for Canvas resource/tool/prompt exposure
- Auth: python-jose for JWT; LTI 1.3 OIDC launch flow
- Observability: OpenTelemetry + Azure Monitor
- Linting/Formatting:
ruff(replaces flake8/black/isort)
Never use pip or python -m venv. Always use:
uv add <package> # add dependency
uv run <script.py> # run script
uv sync # sync environment
uv run pytest # run testsFrontend
- Framework: React 19 + TypeScript + Vite
- State: React Query for server state
- Styling: Sass
- AI Streaming: OpenAI SDK (streaming responses)
- Package manager: npm (workspace at root)
Infrastructure
- Cloud: Azure Container Apps (deployment target)
- CI/CD: GitHub Actions (
.github/workflows/)developpush → test environment- Release/RC tags → stage environment
- IaC: Terraform under
infrastructure/terraform/ - Containers: Multi-stage Docker builds
Key Patterns
FastAPI Route Structure
Routes live under lti/backend/agent/src/api/ organized by domain (e.g., lti/, oauth/, agent/, tools/). Each domain typically has:
router.py— FastAPI router with endpoint definitionsmodels.py— Pydantic request/response modelsservice.py— Business logic (called from router)db.py— Database access layer
MCP Components (canvas_mcp/)
servers/— FastMCP server instancesservices/— Canvas API data fetchingclasses/— Domain abstractionsmodels/— Pydantic models for MCP types
Database Models
- Shared models in
lti/backend/db/src/canvas_lti_db/ - Migrations split:
lti/backend/agent/alembic/andlti/backend/db/alembic/ - Always use async SQLAlchemy patterns
Testing
- Framework:
pytest+pytest-asyncio - Tests in
lti/backend/agent/tests/ - Mock Canvas OAuth server (Docker) for integration tests
- Run:
uv run pytestfromlti/backend/agent/
LTI 1.3 Auth Flow
- Canvas initiates OIDC login (
/lti/login) - App redirects back with signed JWT
- Canvas POSTs launch JWT (
/lti/launch) - App validates JWT, creates session
Environment Config
lti/backend/agent/src/env.py— PydanticBaseSettings- Secrets via environment variables (Azure Key Vault in prod)
Common Tasks
Add a new API endpoint
- Add route in appropriate
api/<domain>/router.py - Define Pydantic models in
api/<domain>/models.py - Implement logic in
api/<domain>/service.py - Write async tests in
tests/
Add a new MCP resource or tool
- Implement in
canvas_mcp/services/ - Register in appropriate
canvas_mcp/servers/file - Add Pydantic types to
canvas_mcp/models/
Add a database model
- Add SQLAlchemy model to
lti/backend/db/src/canvas_lti_db/ - Generate migration:
uv run alembic revision --autogenerate -m "description" - Apply:
uv run alembic upgrade head
Add a frontend feature
- Work in
lti/web/lti-frontend/src/ - Use React Query for data fetching
- Shared chat UI lives in
packages/rocky-chat/
Pydantic v2
This project uses Pydantic v2. Key differences:
- Use
model_validator,field_validator(not v1@validator) - Use
model_dump()not.dict() - Use
model_config = ConfigDict(...)notclass Config - Settings via
pydantic-settingsBaseSettings
Code Quality Guidelines
- Prefer async/await for all I/O
- Keep routers thin — delegate to services
- Use dependency injection (
Depends) for DB sessions, auth - Type-annotate all function signatures
- Write tests for new endpoints and services
- Follow existing module structure — don't create new top-level packages without discussion
- Use
rufffor linting and formatting (configured inpyproject.toml); runuv run ruff checkanduv run ruff formatbefore committing
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.

