Skip to content
Skills Library
Programming · Building & coding

coding-python

/coding-python

When python, flask, or jinja are being written or edited. Use this skill any time you are writing, editing, refactoring, or reviewing Python (.py), Django-related, Flask routes/blueprints, or Jinja2 templates (.jinja or .html with Jinja). Trigger even if the user only mentions a .py file, a Flask endpoint, a template, or asks about Python patterns, imports, error handling, or structure. Load with read_file on .kilocode/skills/coding-python/SKILL.md (ignore the absolute path in the location tag).

Licence
CC0-1.0
Last repository change
22.06.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
2
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 22.06.2026, without references to retired models or APIs.

Licence

CC0-1.0, otwarta.

What it does and when to use it

When python, flask, or jinja are being written or edited. Use this skill any time you are writing, editing, refactoring, or reviewing Python (.py), Django-related, Flask routes/blueprints, or Jinja2 templates (.jinja or .html with Jinja). Trigger even if the user only mentions a .py file, a Flask endpoint, a template, or asks about Python patterns, imports, error handling, or structure. Load with read_file on .kilocode/skills/coding-python/SKILL.md (ignore the absolute path in the location tag).

Original author description

When python, flask, or jinja are being written or edited. Use this skill any time you are writing, editing, refactoring, or reviewing Python (.py), Django-related, Flask routes/blueprints, or Jinja2 templates (.jinja or .html with Jinja). Trigger even if the user only mentions a .py file, a Flask endpoint, a template, or asks about Python patterns, imports, error handling, or structure. Load with read_file on .kilocode/skills/coding-python/SKILL.md (ignore the absolute path in the location tag).

How it works

  1. Mandatory Metadata
  2. Syntax & Style
  3. Error Handling
  4. Docstrings
  5. Flask-Specific Patterns
  6. Jinja2-Specific Patterns
  7. Testing (pytest)
Original SKILL.md headings · 112 lines, 479 words
SKILL.md preview
---
name: coding-python
description: When python, flask, or jinja are being written or edited. Use this skill any time you are writing, editing, refactoring, or reviewing Python (.py), Django-related, Flask routes/blueprints, or Jinja2 templates (.jinja or .html with Jinja). Trigger even if the user only mentions a .py file, a Flask endpoint, a template, or asks about Python patterns, imports, error handling, or structure. Load with read_file on .kilocode/skills/coding-python/SKILL.md (ignore the absolute path in the location tag).
---

# Python Coding Standards

## Mandatory Metadata
Every function or class you **create or modify** must include this header comment:
```python
# Created by [Model_Name] | YYYY-MM-DD
# Example: # Created by GPT-5.5 | 2026-07-04
```
For modifications to existing functions/classes:
```python
# Modified by [Model_Name] | YYYY-MM-DD
# Example: # Modified by Claude-Sonnet-4.8 | 2026-07-04
```
Use the current model name from context and today's date.

## Syntax & Style

### Quotes
- Use **double quotes** (`"`) in all cases.
  - Good: `x += "."`
  - Bad: `x += '.'`

### String Formatting
- Use **f-strings** for interpolation (not `%` or `.format()`).
  - Good: `f"Hello, {name}!"`
  - Bad: `"Hello, {}!".format(name)` or `"Hello, %s" % name`

### SQL
- Always use **multi-line triple-quoted strings** for SQL queries.

### Readability
- Prioritize readable code over clever/compact one-liners.
- Keep vertical spacing compact — no excessive blank lines.

### Type Hints
- Add type hints to new functions you write (not required when modifying existing code without type hints).
  ```python
  def user_get(user_id: int) -> dict:
  ```

## Error Handling
- Use specific exception types — avoid bare `except:`.
- Log errors with context before re-raising or returning.
  ```python
  try:
      result = file_read(path)
  except FileNotFoundError as e:
      logger.error(f"File not found: {path} — {e}")
      raise
  ```

## Docstrings
- Add a one-line docstring to every new public function or class.
- Use triple double-quotes.
  ```python
  def user_sync(folders: list) -> bool:
      """Sync skill directories across all provided folder paths."""
  ```

---

## Flask-Specific Patterns

### Route Organization
- Keep route handlers thin — delegate logic to utility functions.
- Group related routes into blueprints (`blueprints/` folder).
- Route naming: use domain-first (e.g., `/user/edit` or `/user_edit`, not `/edit_user`).

### Error Handlers
- Register global error handlers in the app factory, not inline.
  ```python
  @app.errorhandler(404)
  def error_not_found(e):
      return jsonify({"error": "Not found"}), 404
  ```

### Response Pattern
- Use `jsonify()` for API responses; set explicit status codes.

---

## Jinja2-Specific Patterns

### Template Inheritance
- All page templates should extend a base layout:
  ```jinja
  {% extends "layout.jinja" %}
  {% block content %}
    {# page content here #}
  {% endblock %}
  ```

### Variable Safety
- Use the `| default()` filter when a variable might be undefined:
  ```jinja
  {{ user.name | default("Guest") }}
  ```

### Logic in Templates
- Keep logic minimal in templates — complex logic belongs in Python, not Jinja.
- Use `{% set %}` for local variables rather than inline expressions when readability suffers.

---

## Testing (pytest)
- Read skill-local guidance only when `.kilocode/skills/coding-python/AGENTS.md` is confirmed to exist; otherwise use root `AGENTS.md` for project-specific Python, Flask, Jinja, and test paths.
- Test files generally follow `test_[module_name].py` naming.
- Each test function name describes what it verifies: `test_user_sync_creates_backup`.
- Use `tmp_path` fixture for file system tests — never write to real project paths.
- Confirm a test doesn't already exist before writing a new one.
Files in this package (2)
  • AGENTS.md 1 KB
  • SKILL.md 4 KB

Versions

The database has no other skills named coding-python.

Database snapshot: 13.11.2026 · package version 95298d9507cf (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100flask
    Flask framework guardrails, patterns, and best practices for AI-assisted development. Use when working with Flask projects, or when the user mentions Flask. Provides blueprint patterns, extensions, Jinja2 templates, and REST API guidelines.
  • 100flask
    Flask lightweight Python framework. Covers routing, blueprints, and extensions. Use for simple Python APIs and microservices. USE WHEN: user mentions "flask", "flask blueprints", "python microservice", asks about "flask-restful", "flask extensions", "lightweight python api",…
  • 100python-flask-developer
    Use when building Flask web applications, REST APIs, or microservices. Covers Flask 3.x patterns, application factory, blueprints, extensions, deployment, testing, database sessions, and production configuration. Also covers when to choose Flask vs FastAPI vs Django.
  • 100flask
    Expert skill for Flask web framework development. Covers application factory, blueprints, routing, request/response handling, Jinja2 templates, application and request context (g, current_app), configuration, extensions ecosystem (SQLAlchemy, Login, WTF, CORS, Migrate), error…
  • 100python-flask-apis
    Use this skill when developing lightweight, modular Python microservices and REST endpoints using Flask and Blueprints.
  • 100flask
    Expert Flask assistance covering Blueprints, application factories, Jinja2 templating, and SQLAlchemy extensions. Use when developing lightweight Python web services and applications.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.