OpenParable
Skip to content
← Back to skills

Chromestatus Backend

Development
chromestatus-backend

Chromestatus Backend is an Agent Skill for development published in the GoogleChrome/chromium-dashboard repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Guidance for working on the Flask-based backend, NDB Datastore, and OpenAPI integrations in chromium-dashboard.

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/GoogleChrome/chromium-dashboard/blob/HEAD/.agents/skills/chromestatus-backend/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/chromestatus-backend, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

Backend Development Skill

This skill provides context and guidelines for developing the backend of the chromium-dashboard project.

Core Technologies

  • Flask: The primary web framework for request handling and template rendering.
  • Cloud NDB: Used for interacting with Google Cloud Datastore.
  • OpenAPI 3.0: Used for defining APIs and generating Python data models.

Key Directories

  • api/: Contains Flask request handlers for various API endpoints.
  • framework/: Core infrastructure, including basehandlers.py and utility functions.
  • internals/: Business logic, search filters, and data processing.
  • pages/: (LEGACY) Handlers for main application pages. Do not add new code here.
  • openapi/: OpenAPI specification file (api.yaml).
  • gen/py/chromestatus_openapi/: Auto-generated Python models from OpenAPI.

Guidelines

  • API Development: Prefer adding new APIs via OpenAPI in openapi/api.yaml. Use make openapi-backend to regenerate models.
  • Handlers: Extend basehandlers.py classes for consistent permission checking and response handling. Do not add new handlers to the legacy pages/ directory.
  • Datastore: Use NDB models defined in internals/models.py. Ensure queries are optimized and use proper indexing (see index.yaml).
  • Testing: Python unit tests are located alongside the code (e.g., *_test.py). Run them using npm test.

Common Tasks

  • Adding a Route: Define the route in @main.py and map it to a handler class in api/ or pages/.
  • Modifying Schema: Update @internals/models.py and run a backfill script if necessary.