[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7F7S1A3MYBSDNZ87QETKA6D":3,"skill-same:01M7F7S1A3MYBSDNZ87QETKA6D":64},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":6,"ownerDescription":30,"updatedAt":31,"install":32,"resources":45},"01M7F7S1A3MYBSDNZ87QETKA6D","backend-code-review",null,"Review backend code for quality, security, maintainability, and best practices based on established checklist rules. Use when the user requests a review, analysis, or improvement of backend files (e.g., `.py`) under the `src\u002Fbackend\u002F` directory. Do NOT use for frontend files (e.g., `.tsx`, `.ts`, `.js`). Supports pending-change review, code snippets review, and file-focused review.","lza6\u002FArmor-piercing-system-prompts","lza6","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F128880206?v=4","01M7EB3K7WPX5T28EJ2NVHE6EG","Chinese-tingfeng","01M7EB3K97E1KQ16QWKJMFNGX8",11,"MIT","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F06-前端与设计\u002Fbackend-code-review\u002FSKILL.md",[],[],"2026-11-16 10:05:34",false,"---\nname: backend-code-review\ndescription: Review backend code for quality, security, maintainability, and best practices based on established checklist rules. Use when the user requests a review, analysis, or improvement of backend files (e.g., `.py`) under the `src\u002Fbackend\u002F` directory. Do NOT use for frontend files (e.g., `.tsx`, `.ts`, `.js`). Supports pending-change review, code snippets review, and file-focused review.\n---\n\n# Backend Code Review\n\n## When to use this skill\n\nUse this skill whenever the user asks to **review, analyze, or improve** backend code (e.g., `.py`) under the `src\u002Fbackend\u002F` directory. Supports the following review modes:\n\n- **Pending-change review**: when the user asks to review current changes (inspect staged\u002Fworking-tree files slated for commit to get the changes).\n- **Code snippets review**: when the user pastes code snippets (e.g., a function\u002Fclass\u002Fmodule excerpt) into the chat and asks for a review.\n- **File-focused review**: when the user points to specific files and asks for a review of those files (one file or a small, explicit set of files, e.g., `src\u002Fbackend\u002Fbase\u002Flangflow\u002Fapi\u002Fv1\u002Fflows.py`).\n\nDo NOT use this skill when:\n\n- The request is about frontend code or UI (e.g., `.tsx`, `.ts`, `.js`, `src\u002Ffrontend\u002F`).\n- The user is not asking for a review\u002Fanalysis\u002Fimprovement of backend code.\n- The scope is not under `src\u002Fbackend\u002F` (unless the user explicitly asks to review backend-related changes outside `src\u002Fbackend\u002F`).\n\n## How to use this skill\n\nFollow these steps when using this skill:\n\n1. **Identify the review mode** (pending-change vs snippet vs file-focused) based on the user's input. Keep the scope tight: review only what the user provided or explicitly referenced.\n2. Follow the rules defined in **Checklist** to perform the review. If no Checklist rule matches, apply **General Review Rules** as a fallback to perform the best-effort review.\n3. Compose the final output strictly following the **Required Output Format**.\n\nNotes when using this skill:\n- Always include actionable fixes or suggestions (including possible code snippets).\n- Use best-effort `File:Line` references when a file path and line numbers are available; otherwise, use the most specific identifier you can.\n\n## Checklist\n\n- db schema design: if the review scope includes code\u002Ffiles under `src\u002Fbackend\u002Fbase\u002Flangflow\u002Fservices\u002Fdatabase\u002Fmodels\u002F` or Alembic migrations under `src\u002Fbackend\u002Fbase\u002Flangflow\u002Falembic\u002Fversions\u002F`, follow [references\u002Fdb-schema-rule.md](references\u002Fdb-schema-rule.md) to perform the review\n- architecture: if the review scope involves route\u002Fservice\u002Fmodel layering, dependency direction, or moving responsibilities across modules, follow [references\u002Farchitecture-rule.md](references\u002Farchitecture-rule.md) to perform the review\n- service abstraction: if the review scope contains table\u002Fmodel operations (e.g., `select(...)`, `session.execute(...)`, joins, CRUD) and is not already inside a service under `src\u002Fbackend\u002Fbase\u002Flangflow\u002Fservices\u002F`, follow [references\u002Frepositories-rule.md](references\u002Frepositories-rule.md) to perform the review\n- sqlalchemy patterns: if the review scope involves SQLAlchemy\u002FSQLModel session\u002Fquery usage, db transaction\u002Fcrud usage, `session_scope()` usage, or raw SQL usage, follow [references\u002Fsqlalchemy-rule.md](references\u002Fsqlalchemy-rule.md) to perform the review\n\n## General Review Rules\n\n### 1. Security Review\n\nCheck for:\n- SQL injection vulnerabilities (especially raw `text()` queries with string interpolation). Consequence: attacker can read\u002Fmodify\u002Fdelete any data in the database.\n- Server-Side Request Forgery (SSRF) in component HTTP calls. Consequence: attacker uses the server to scan internal networks or access cloud metadata endpoints.\n- Command injection (especially in subprocess or shell-executing components). Consequence: attacker gains shell access to the server.\n- Insecure deserialization (pickle, yaml.load without SafeLoader). Consequence: arbitrary code execution on the server.\n- Hardcoded secrets\u002Fcredentials. Consequence: secrets leak via git history and are impossible to fully revoke.\n- Improper authentication\u002Fauthorization (missing `CurrentActiveUser` dependency). Consequence: unauthenticated users can access protected endpoints.\n- Insecure direct object references (missing `user_id` scoping on queries). Consequence: user A can read\u002Fmodify user B's flows, variables, API keys.\n- Path traversal in file storage operations. Consequence: attacker reads arbitrary server files (e.g., `\u002Fetc\u002Fpasswd`, `.env`).\n\n### 2. Performance Review\n\nCheck for:\n- N+1 queries (especially in loops calling `session.execute()`). Consequence: 100 flows = 101 DB queries instead of 2; page load goes from 50ms to 5s.\n- Missing database indexes on frequently queried columns. Consequence: full table scans on large datasets; queries degrade from O(log n) to O(n).\n- Memory leaks (unbounded caches, retained references in long-lived services). Consequence: server OOM after hours of operation; pods restart in production.\n- Blocking operations in async code (`time.sleep()`, synchronous I\u002FO, CPU-bound work without `run_in_executor`). Consequence: entire event loop stalls; all concurrent requests hang until the blocking call completes.\n- Missing caching opportunities for expensive computations. Consequence: repeated computation of the same result on every request.\n- Large result sets loaded entirely into memory without pagination. Consequence: memory spike + slow response when user has 10K+ flows.\n\n### 3. Code Quality Review\n\nCheck for:\n- Code forward compatibility with Python 3.10-3.13\n- Code duplication (DRY violations — extract when the *exact same business rule* is duplicated in 3+ places)\n- Functions doing too much (SRP violations — if you need \"and\" to describe it, split it)\n- Deep nesting \u002F complex conditionals (prefer early returns and guard clauses)\n- Magic numbers\u002Fstrings (extract to named constants or enums)\n- Poor naming: unclear abbreviations, misleading names, generic names (`data`, `result`, `obj`, `temp`). Functions should use verbs (`get`, `create`, `validate`). Booleans should use prefixes (`is_`, `has_`, `can_`, `should_`).\n- Missing error handling (bare `except`, swallowed exceptions, silent failures)\n- Incomplete type coverage (use strong typing, avoid `Any` where a concrete type is known)\n- Use Python 3.10+ union syntax (`X | Y` not `Union[X, Y]`, `X | None` not `Optional[X]`)\n- Use `TYPE_CHECKING` guard for imports only needed for type annotations (prevents circular imports)\n- Use `Annotated[Type, Depends(...)]` with project aliases (`CurrentActiveUser`, `DbSession`, `DbSessionReadOnly`) for FastAPI DI\n- Google-style docstrings (enforced by Ruff): `Args:`, `Returns:`, `Raises:` sections for public functions\n- Violations of SOLID principles\n- YAGNI violations (code that anticipates future needs without a present requirement)\n- Line length exceeding 120 characters (project Ruff config)\n- Comments that explain WHAT instead of WHY (comments should only explain reasoning, not restate code)\n- Commented-out code (use version control instead)\n- Boolean parameters that switch function behavior (split into two named functions instead)\n- Mutable shared state where immutable alternatives exist (prefer returning new objects over mutation)\n\n### 4. File Structure Review\n\nCheck for:\n- Production files exceeding ~500 lines of code (excluding imports, types, and docstrings). Files above 600 lines are a red flag and should be split by responsibility. Why: Files above 500 lines have statistically higher defect rates and take longer to review. They signal multiple responsibilities (SRP violation). In Langflow, services like `DatabaseService` that grow beyond this limit should have their CRUD operations extracted to dedicated modules.\n- Test files exceeding ~1000 lines. Split by logical grouping if exceeded.\n- No more than 5 functions with different responsibilities in a single file (per AGENTS-example.md).\n- Each file has a single reason to exist and a single reason to change (SRP).\n- No generic file names: `utils.py`, `helpers.py`, `misc.py`, `common.py` as standalone files. Why: A file named `utils.py` becomes a dumping ground for unrelated functions. Within months it has 50+ functions covering formatting, validation, parsing, and HTTP calls — violating SRP. Each function group should be in a file named after its responsibility (`formatting.py`, `validation.py`).\n\n### 5. Testing Review\n\nCheck for:\n- Missing test coverage for new code paths\n- Tests that don't test behavior (testing implementation details)\n- Flaky test patterns (time-dependent, order-dependent, external-service-dependent)\n- Proper use of `pytest.mark.asyncio` for async tests\n- Excessive mocking (prefer real integrations per project conventions)\n- Coverage target: 80% (minimum acceptable: 75%)\n- Test anti-patterns: The Liar (passes but doesn't verify claimed behavior), The Mirror (asserts exactly what code does), The Giant (50+ lines setup), The Mockery (tests only mock setup), The Inspector (coupled to implementation), The Chain Gang (depends on execution order), The Flaky (inconsistent results)\n\n**Happy path tests are the foundation but are NOT enough.** Tests MUST also challenge the code to find real defects:\n\n- **Unexpected inputs**: `None`, `\"\"`, `[]`, `{}`, `0`, `-1`, `UUID(\"00000000-0000-0000-0000-000000000000\")`\n- **Boundary values**: max length strings, exactly at the limit, one past the limit, zero items, max items\n- **Malformed data**: missing required fields, extra unexpected fields, wrong types, invalid formats\n- **Error states**: what happens when the database is down? When an external API returns 500? When the user doesn't exist?\n- **What should NOT happen**: verify that user A CANNOT access user B's flows. Verify that a deleted flow returns 404. Verify that invalid `endpoint_name` is rejected with 422.\n- **Error messages and types**: not just that it fails, but that it fails with the RIGHT exception and the RIGHT message\n- **Concurrency**: what happens when two requests try to update the same flow simultaneously?\n\n**Write tests based on REQUIREMENTS\u002FSPEC, not on what the source code currently does.** This is how you catch bugs where the code diverges from expected behavior.\n\n**When a test fails:** first ask if the CODE is wrong, not the test. Do NOT silently change a failing assertion to match the current code without understanding WHY.\n\n### 6. Observability Review\n\nCheck for:\n- Use the async logger from `lfx.log.logger` with `a`-prefixed methods (`adebug`, `ainfo`, `awarning`, `aerror`, `aexception`). Never use `print()` or stdlib `logging`.\n- Log at key decision points and boundaries, not inside tight loops\n- Include: operation name, relevant IDs, outcome (success\u002Ffailure), duration if relevant\n- Correct log levels: ERROR (broken, needs attention), WARN (degraded but recoverable), INFO (significant events), DEBUG (diagnostic, off in prod)\n- **ZERO PII TOLERANCE**: Never log email addresses, user names, phone numbers, tokens, passwords. Only approved identifiers: `user_id`, `flow_id`, `session_id`\n- No `print()` statements — these go to production logs\n- Use `{e!s}` for string representation of exceptions in log messages\n\n### 7. Pre-Commit Verification\n\nFor pending-change reviews, verify the author has run:\n- `make format_backend` (Ruff formatter) — inconsistent formatting creates noisy diffs that hide real changes in code review. Format first, review second.\n- `make lint` (MyPy type checking) — type errors caught at lint time are 10x cheaper to fix than runtime crashes in production. Langflow services use duck typing via `Service` base class; MyPy catches mismatches early.\n- `make unit_tests` (pytest) — a failing test means the change breaks existing behavior. Never merge with failing tests; investigate whether the code or the test is wrong.\n\n## Required Output Format\n\nWhen this skill is invoked, the response must exactly follow one of the two templates:\n\n### Template A (any findings)\n\n```markdown\n# Code Review Summary\n\nFound \u003CX> critical issues need to be fixed:\n\n## 🔴 Critical (Must Fix)\n\n### 1. \u003Cbrief description of the issue>\n\nFilePath: \u003Cpath> line \u003Cline>\n\u003Crelevant code snippet or pointer>\n\n#### Explanation\n\n\u003Cdetailed explanation and references of the issue>\n\n#### Suggested Fix\n\n1. \u003Cbrief description of suggested fix>\n2. \u003Ccode example> (optional, omit if not applicable)\n\n---\n... (repeat for each critical issue) ...\n\nFound \u003CY> suggestions for improvement:\n\n## 🟡 Suggestions (Should Consider)\n\n### 1. \u003Cbrief description of the suggestion>\n\nFilePath: \u003Cpath> line \u003Cline>\n\u003Crelevant code snippet or pointer>\n\n#### Explanation\n\n\u003Cdetailed explanation and references of the suggestion>\n\n#### Suggested Fix\n\n1. \u003Cbrief description of suggested fix>\n2. \u003Ccode example> (optional, omit if not applicable)\n\n---\n... (repeat for each suggestion) ...\n\nFound \u003CZ> optional nits:\n\n## 🟢 Nits (Optional)\n### 1. \u003Cbrief description of the nit>\n\nFilePath: \u003Cpath> line \u003Cline>\n\u003Crelevant code snippet or pointer>\n\n#### Explanation\n\n\u003Cexplanation and references of the optional nit>\n\n#### Suggested Fix\n\n- \u003Cminor suggestions>\n\n---\n... (repeat for each nits) ...\n\n## ✅ What's Good\n\n- \u003CPositive feedback on good patterns>\n```\n\n- If there are no critical issues or suggestions or optional nits or good points, just omit that section.\n- If the issue number is more than 10, summarize as \"Found 10+ critical issues\u002Fsuggestions\u002Foptional nits\" and only output the first 10 items.\n- Don't compress the blank lines between sections; keep them as-is for readability.\n- If there is any issue that requires code changes, append a brief follow-up question to ask whether the user wants to apply the fix(es) after the structured output. For example: \"Would you like me to use the Suggested fix(es) to address these issues?\"\n\n### Template B (no issues)\n\n```markdown\n## Code Review Summary\n✅ No issues found.\n```\n","# Backend Code Review\n\n## When to use this skill\n\nUse this skill whenever the user asks to **review, analyze, or improve** backend code (e.g., `.py`) under the `src\u002Fbackend\u002F` directory. Supports the following review modes:\n\n- **Pending-change review**: when the user asks to review current changes (inspect staged\u002Fworking-tree files slated for commit to get the changes).\n- **Code snippets review**: when the user pastes code snippets (e.g., a function\u002Fclass\u002Fmodule excerpt) into the chat and asks for a review.\n- **File-focused review**: when the user points to specific files and asks for a review of those files (one file or a small, explicit set of files, e.g., `src\u002Fbackend\u002Fbase\u002Flangflow\u002Fapi\u002Fv1\u002Fflows.py`).\n\nDo NOT use this skill when:\n\n- The request is about frontend code or UI (e.g., `.tsx`, `.ts`, `.js`, `src\u002Ffrontend\u002F`).\n- The user is not asking for a review\u002Fanalysis\u002Fimprovement of backend code.\n- The scope is not under `src\u002Fbackend\u002F` (unless the user explicitly asks to review backend-related changes outside `src\u002Fbackend\u002F`).\n\n## How to use this skill\n\nFollow these steps when using this skill:\n\n1. **Identify the review mode** (pending-change vs snippet vs file-focused) based on the user's input. Keep the scope tight: review only what the user provided or explicitly referenced.\n2. Follow the rules defined in **Checklist** to perform the review. If no Checklist rule matches, apply **General Review Rules** as a fallback to perform the best-effort review.\n3. Compose the final output strictly following the **Required Output Format**.\n\nNotes when using this skill:\n- Always include actionable fixes or suggestions (including possible code snippets).\n- Use best-effort `File:Line` references when a file path and line numbers are available; otherwise, use the most specific identifier you can.\n\n## Checklist\n\n- db schema design: if the review scope includes code\u002Ffiles under `src\u002Fbackend\u002Fbase\u002Flangflow\u002Fservices\u002Fdatabase\u002Fmodels\u002F` or Alembic migrations under `src\u002Fbackend\u002Fbase\u002Flangflow\u002Falembic\u002Fversions\u002F`, follow [references\u002Fdb-schema-rule.md](references\u002Fdb-schema-rule.md) to perform the review\n- architecture: if the review scope involves route\u002Fservice\u002Fmodel layering, dependency direction, or moving responsibilities across modules, follow [references\u002Farchitecture-rule.md](references\u002Farchitecture-rule.md) to perform the review\n- service abstraction: if the review scope contains table\u002Fmodel operations (e.g., `select(...)`, `session.execute(...)`, joins, CRUD) and is not already inside a service under `src\u002Fbackend\u002Fbase\u002Flangflow\u002Fservices\u002F`, follow [references\u002Frepositories-rule.md](references\u002Frepositories-rule.md) to perform the review\n- sqlalchemy patterns: if the review scope involves SQLAlchemy\u002FSQLModel session\u002Fquery usage, db transaction\u002Fcrud usage, `session_scope()` usage, or raw SQL usage, follow [references\u002Fsqlalchemy-rule.md](references\u002Fsqlalchemy-rule.md) to perform the review\n\n## General Review Rules\n\n### 1. Security Review\n\nCheck for:\n- SQL injection vulnerabilities (especially raw `text()` queries with string interpolation). Consequence: attacker can read\u002Fmodify\u002Fdelete any data in the database.\n- Server-Side Request Forgery (SSRF) in component HTTP calls. Consequence: attacker uses the server to scan internal networks or access cloud metadata endpoints.\n- Command injection (especially in subprocess or shell-executing components). Consequence: attacker gains shell access to the server.\n- Insecure deserialization (pickle, yaml.load without SafeLoader). Consequence: arbitrary code execution on the server.\n- Hardcoded secrets\u002Fcredentials. Consequence: secrets leak via git history and are impossible to fully revoke.\n- Improper authentication\u002Fauthorization (missing `CurrentActiveUser` dependency). Consequence: unauthenticated users can access protected endpoints.\n- Insecure direct object references (missing `user_id` scoping on queries). Consequence: user A can read\u002Fmodify user B's flows, variables, API keys.\n- Path traversal in file storage operations. Consequence: attacker reads arbitrary server files (e.g., `\u002Fetc\u002Fpasswd`, `.env`).\n\n### 2. Performance Review\n\nCheck for:\n- N+1 queries (especially in loops calling `session.execute()`). Consequence: 100 flows = 101 DB queries instead of 2; page load goes from 50ms to 5s.\n- Missing database indexes on frequently queried columns. Consequence: full table scans on large datasets; queries degrade from O(log n) to O(n).\n- Memory leaks (unbounded caches, retained references in long-lived services). Consequence: server OOM after hours of operation; pods restart in production.\n- Blocking operations in async code (`time.sleep()`, synchronous I\u002FO, CPU-bound work without `run_in_executor`). Consequence: entire event loop stalls; all concurrent requests hang until the blocking call completes.\n- Missing caching opportunities for expensive computations. Consequence: repeated computation of the same result on every request.\n- Large result sets loaded entirely into memory without pagination. Consequence: memory spike + slow response when user has 10K+ flows.\n\n### 3. Code Quality Review\n\nCheck for:\n- Code forward compatibility with Python 3.10-3.13\n- Code duplication (DRY violations — extract when the *exact same business rule* is duplicated in 3+ places)\n- Functions doing too much (SRP violations — if you need \"and\" to describe it, split it)\n- Deep nesting \u002F complex conditionals (prefer early returns and guard clauses)\n- Magic numbers\u002Fstrings (extract to named constants or enums)\n- Poor naming: unclear abbreviations, misleading names, generic names (`data`, `result`, `obj`, `temp`). Functions should use verbs (`get`, `create`, `validate`). Booleans should use prefixes (`is_`, `has_`, `can_`, `should_`).\n- Missing error handling (bare `except`, swallowed exceptions, silent failures)\n- Incomplete type coverage (use strong typing, avoid `Any` where a concrete type is known)\n- Use Python 3.10+ union syntax (`X | Y` not `Union[X, Y]`, `X | None` not `Optional[X]`)\n- Use `TYPE_CHECKING` guard for imports only needed for type annotations (prevents circular imports)\n- Use `Annotated[Type, Depends(...)]` with project aliases (`CurrentActiveUser`, `DbSession`, `DbSessionReadOnly`) for FastAPI DI\n- Google-style docstrings (enforced by Ruff): `Args:`, `Returns:`, `Raises:` sections for public functions\n- Violations of SOLID principles\n- YAGNI violations (code that anticipates future needs without a present requirement)\n- Line length exceeding 120 characters (project Ruff config)\n- Comments that explain WHAT instead of WHY (comments should only explain reasoning, not restate code)\n- Commented-out code (use version control instead)\n- Boolean parameters that switch function behavior (split into two named functions instead)\n- Mutable shared state where immutable alternatives exist (prefer returning new objects over mutation)\n\n### 4. File Structure Review\n\nCheck for:\n- Production files exceeding ~500 lines of code (excluding imports, types, and docstrings). Files above 600 lines are a red flag and should be split by responsibility. Why: Files above 500 lines have statistically higher defect rates and take longer to review. They signal multiple responsibilities (SRP violation). In Langflow, services like `DatabaseService` that grow beyond this limit should have their CRUD operations extracted to dedicated modules.\n- Test files exceeding ~1000 lines. Split by logical grouping if exceeded.\n- No more than 5 functions with different responsibilities in a single file (per AGENTS-example.md).\n- Each file has a single reason to exist and a single reason to change (SRP).\n- No generic file names: `utils.py`, `helpers.py`, `misc.py`, `common.py` as standalone files. Why: A file named `utils.py` becomes a dumping ground for unrelated functions. Within months it has 50+ functions covering formatting, validation, parsing, and HTTP calls — violating SRP. Each function group should be in a file named after its responsibility (`formatting.py`, `validation.py`).\n\n### 5. Testing Review\n\nCheck for:\n- Missing test coverage for new code paths\n- Tests that don't test behavior (testing implementation details)\n- Flaky test patterns (time-dependent, order-dependent, external-service-dependent)\n- Proper use of `pytest.mark.asyncio` for async tests\n- Excessive mocking (prefer real integrations per project conventions)\n- Coverage target: 80% (minimum acceptable: 75%)\n- Test anti-patterns: The Liar (passes but doesn't verify claimed behavior), The Mirror (asserts exactly what code does), The Giant (50+ lines setup), The Mockery (tests only mock setup), The Inspector (coupled to implementation), The Chain Gang (depends on execution order), The Flaky (inconsistent results)\n\n**Happy path tests are the foundation but are NOT enough.** Tests MUST also challenge the code to find real defects:\n\n- **Unexpected inputs**: `None`, `\"\"`, `[]`, `{}`, `0`, `-1`, `UUID(\"00000000-0000-0000-0000-000000000000\")`\n- **Boundary values**: max length strings, exactly at the limit, one past the limit, zero items, max items\n- **Malformed data**: missing required fields, extra unexpected fields, wrong types, invalid formats\n- **Error states**: what happens when the database is down? When an external API returns 500? When the user doesn't exist?\n- **What should NOT happen**: verify that user A CANNOT access user B's flows. Verify that a deleted flow returns 404. Verify that invalid `endpoint_name` is rejected with 422.\n- **Error messages and types**: not just that it fails, but that it fails with the RIGHT exception and the RIGHT message\n- **Concurrency**: what happens when two requests try to update the same flow simultaneously?\n\n**Write tests based on REQUIREMENTS\u002FSPEC, not on what the source code currently does.** This is how you catch bugs where the code diverges from expected behavior.\n\n**When a test fails:** first ask if the CODE is wrong, not the test. Do NOT silently change a failing assertion to match the current code without understanding WHY.\n\n### 6. Observability Review\n\nCheck for:\n- Use the async logger from `lfx.log.logger` with `a`-prefixed methods (`adebug`, `ainfo`, `awarning`, `aerror`, `aexception`). Never use `print()` or stdlib `logging`.\n- Log at key decision points and boundaries, not inside tight loops\n- Include: operation name, relevant IDs, outcome (success\u002Ffailure), duration if relevant\n- Correct log levels: ERROR (broken, needs attention), WARN (degraded but recoverable), INFO (significant events), DEBUG (diagnostic, off in prod)\n- **ZERO PII TOLERANCE**: Never log email addresses, user names, phone numbers, tokens, passwords. Only approved identifiers: `user_id`, `flow_id`, `session_id`\n- No `print()` statements — these go to production logs\n- Use `{e!s}` for string representation of exceptions in log messages\n\n### 7. Pre-Commit Verification\n\nFor pending-change reviews, verify the author has run:\n- `make format_backend` (Ruff formatter) — inconsistent formatting creates noisy diffs that hide real changes in code review. Format first, review second.\n- `make lint` (MyPy type checking) — type errors caught at lint time are 10x cheaper to fix than runtime crashes in production. Langflow services use duck typing via `Service` base class; MyPy catches mismatches early.\n- `make unit_tests` (pytest) — a failing test means the change breaks existing behavior. Never merge with failing tests; investigate whether the code or the test is wrong.\n\n## Required Output Format\n\nWhen this skill is invoked, the response must exactly follow one of the two templates:\n\n### Template A (any findings)\n\n```markdown\n# Code Review Summary\n\nFound \u003CX> critical issues need to be fixed:\n\n## 🔴 Critical (Must Fix)\n\n### 1. \u003Cbrief description of the issue>\n\nFilePath: \u003Cpath> line \u003Cline>\n\u003Crelevant code snippet or pointer>\n\n#### Explanation\n\n\u003Cdetailed explanation and references of the issue>\n\n#### Suggested Fix\n\n1. \u003Cbrief description of suggested fix>\n2. \u003Ccode example> (optional, omit if not applicable)\n\n---\n... (repeat for each critical issue) ...\n\nFound \u003CY> suggestions for improvement:\n\n## 🟡 Suggestions (Should Consider)\n\n### 1. \u003Cbrief description of the suggestion>\n\nFilePath: \u003Cpath> line \u003Cline>\n\u003Crelevant code snippet or pointer>\n\n#### Explanation\n\n\u003Cdetailed explanation and references of the suggestion>\n\n#### Suggested Fix\n\n1. \u003Cbrief description of suggested fix>\n2. \u003Ccode example> (optional, omit if not applicable)\n\n---\n... (repeat for each suggestion) ...\n\nFound \u003CZ> optional nits:\n\n## 🟢 Nits (Optional)\n### 1. \u003Cbrief description of the nit>\n\nFilePath: \u003Cpath> line \u003Cline>\n\u003Crelevant code snippet or pointer>\n\n#### Explanation\n\n\u003Cexplanation and references of the optional nit>\n\n#### Suggested Fix\n\n- \u003Cminor suggestions>\n\n---\n... (repeat for each nits) ...\n\n## ✅ What's Good\n\n- \u003CPositive feedback on good patterns>\n```\n\n- If there are no critical issues or suggestions or optional nits or good points, just omit that section.\n- If the issue number is more than 10, summarize as \"Found 10+ critical issues\u002Fsuggestions\u002Foptional nits\" and only output the first 10 items.\n- Don't compress the blank lines between sections; keep them as-is for readability.\n- If there is any issue that requires code changes, append a brief follow-up question to ask whether the user wants to apply the fix(es) after the structured output. For example: \"Would you like me to use the Suggested fix(es) to address these issues?\"\n\n### Template B (no issues)\n\n```markdown\n## Code Review Summary\n✅ No issues found.\n```\n",{"name":5,"description":7},"main","d69096e239f2a89aabc2cd078c47664a9d3b1e11","06-前端与设计\u002Fbackend-code-review",3,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts","https:\u002F\u002Fgithub.com\u002Flza6","个人vx：Tf00798\r\n个人✈：@TFGY999","2026-10-08 14:29:22",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add lza6\u002FArmor-piercing-system-prompts --skill backend-code-review",{"tool":38,"command":39},"bunx","bunx skills add lza6\u002FArmor-piercing-system-prompts --skill backend-code-review",{"tool":41,"command":42},"pnpm","pnpm dlx skills add lza6\u002FArmor-piercing-system-prompts --skill backend-code-review","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F06-前端与设计\u002Fbackend-code-review\u002FSKILL.md",true,[46,52,56,60],{"path":47,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":50,"sourceHtmlUrl":51},"references\u002Farchitecture-rule.md","REFERENCE","参考文档",11739,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F06-前端与设计\u002Fbackend-code-review\u002Freferences\u002Farchitecture-rule.md",{"path":53,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":54,"sourceHtmlUrl":55},"references\u002Fdb-schema-rule.md",12894,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F06-前端与设计\u002Fbackend-code-review\u002Freferences\u002Fdb-schema-rule.md",{"path":57,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":58,"sourceHtmlUrl":59},"references\u002Frepositories-rule.md",11711,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F06-前端与设计\u002Fbackend-code-review\u002Freferences\u002Frepositories-rule.md",{"path":61,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":62,"sourceHtmlUrl":63},"references\u002Fsqlalchemy-rule.md",11340,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F06-前端与设计\u002Fbackend-code-review\u002Freferences\u002Fsqlalchemy-rule.md",[65,72,77,84,91,98],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":19},"01M7FFG485KY83TD6HSC4YPCMC","obsidian-clipper-template-creator","Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobsidian-clipper-template-creator\u002FSKILL.md",[],[],{"skillNo":73,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M7FFG0T6AZ0STEJPSB3CX84K","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobsidian-clipper-template-creator-antigravity-awesome-skills-main\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":19},"01M7FFFY0QEM14SKWPDYGMXM2P","python-api","Programmatic Object-Detection-Metrics API guidance for BoundingBox, BoundingBoxes, Evaluator, enums, coordinate conversion, AP\u002FmAP semantics, and source-style import diagnostics.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002Fsub-skills\u002Fpython-api\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M7FFFVZQZ2GJ0C0TGP7JHD20","file-evaluation","Folder-based PASCAL VOC AP\u002FmAP evaluation from ground-truth and detection text files.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002Fsub-skills\u002Ffile-evaluation\u002FSKILL.md",[],[],{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":19},"01M7FFFSFNYSE77SJ6PE1CK2DA","object-detection-metrics","Guides legacy Object-Detection-Metrics PASCAL VOC AP\u002FmAP evaluation from detection text folders and direct Python API classes.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002FSKILL.md",[],[],{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":19},"01M7FFFP0GCK1RVXBCPQ8APBMT","nx-workspace-patterns","Configure and optimize Nx monorepo workspaces. Use when setting up Nx, configuring project boundaries, optimizing build caching, or implementing affected commands.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fnx-workspace-patterns\u002FSKILL.md",[],[]]