self-review-before-submission

self-review-before-submission is a cursor rule for Cursor from SeanLF/weather-mcp. It costs 1,364 tokens per session, scanned A, original, MIT.

A review step that checks a proposed coding solution before it is submitted. It looks at behavior, edge cases, errors, security, speed, maintainability, and tests.

In plain words
What is it for?
Use it when finishing a feature, fix, or other coding task that needs a final quality check.
Why use it?
It helps catch overlooked problems before the code reaches someone else or a shared codebase. It also leaves a short record of what was checked and what may need improvement.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it when finishing a feature, fix, or other coding task that needs a final quality check.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/seanlf/weather-mcp/self-review-before-submission
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/SeanLF/weather-mcp

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for self-review-before-submission

README.md
[![agentmods](https://agentmods.dev/badge/rules/seanlf/weather-mcp/self-review-before-submission/github.svg)](https://agentmods.dev/rules/seanlf/weather-mcp/self-review-before-submission)
Your own site
<a href="https://agentmods.dev/rules/seanlf/weather-mcp/self-review-before-submission"><img src="https://agentmods.dev/badge/rules/seanlf/weather-mcp/self-review-before-submission/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for self-review-before-submission

Your own site · 80×15
<a href="https://agentmods.dev/rules/seanlf/weather-mcp/self-review-before-submission"><img src="https://agentmods.dev/badge/rules/seanlf/weather-mcp/self-review-before-submission.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,364 This file is loaded in full into every session.
When invoked 1,364 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.01364 $0.01364
Opus 5 $0.00682 $0.00682
Sonnet 5 $0.00273 $0.00273
Haiku 4.5 $0.00136 $0.00136

Measured 12d ago against content hash 068851898ed2, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

self-review-before-submission scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/self-review-before-submission.mdc · 195 lines

How it starts

The opening of the file, as written. The whole thing — 195 lines — stays where its author put it; the contents beside it link to each section on GitHub.

filters:

  • type: event pattern: "code_completion|solution_finalized"
  • type: content pattern: "(?i)(complete|ready|finished|done|solution)"

actions:

  • type: transform pattern: "^.*$" replacement: |

    Self-Reviewed Solution

    {original_content}

    Pre-Submission Checklist

    Category Status Notes
    Functionality {status} {notes}
    Edge Cases {status} {notes}
    Error Handling {status} {notes}
    Security {status} {notes}
    Performance {status} {notes}
    Maintainability {status} {notes}
    Testing {status} {notes}

    Critical Review

    {critical_review_notes}

    Improvements for Future Iterations

    {future_improvements}

  • type: validate conditions:

    • pattern: "." validationScript: | // Define self-review checklist const requiredChecks = [ { name: "Edge Case Handling", patterns: [ /null|undefined|empty|exception|error|catch|if\s(/i ] }, { name: "Input Validation", patterns: [ /validate|check|assert|if\s*([^)]*param/i ] }, { name: "Comments/Documentation", patterns: [ ///|/*|*/|"""|'''/ ] }, { name: "Testing Considerations", patterns: [ /test|assert|expect|should|mock/i ] } ];

      // Check for missing requirements const missingChecks = requiredChecks.filter(check => !check.patterns.some(pattern => pattern.test(fullContent)) );

      if (missingChecks.length > 0) { const missing = missingChecks.map(check => check.name).join(", "); return { valid: false, message: Self-review incomplete: Missing ${missing} }; }

      return { valid: true };

  • type: suggest message: | Before submitting your solution:

    1. Review functionality for correctness and completeness
    2. Test with edge cases and unexpected inputs
    3. Verify error handling for all failure paths
    4. Check for security vulnerabilities
    5. Look for performance bottlenecks
    6. Assess code maintainability
    7. Include tests or testing plans

examples:

  • input: | I've implemented the user search functionality. Here's the solution:

    function searchUsers(query) {
      const users = database.getUsers();
      return users.filter(user => 
        user.name.includes(query) || 
        user.email.includes(query)
      );
    }
    

    output: |

    Self-Reviewed Solution

    /**
     * Search for users by name or email
     * @param {string} query - The search term to look for
     * @returns {Array} - Array of matching user objects
     */
    function searchUsers(query) {
      // Validate input
      if (!query || typeof query !== 'string') {
        return [];
      }
      
      try {
        // Normalize query for case-insensitive search
        const normalizedQuery = query.toLowerCase().trim();
        
        // Return empty array for very short queries
        if (normalizedQuery.length < 2) {
          return [];
        }
        
        // Get users with timeout and limit
        const users = database.getUsers({ timeout: 3000, limit: 1000 });
        
        // Perform case-insensitive search on indexed fields
        return users.filter(user => {
          // Safely handle potentially missing properties
          const name = (user.name || '').toLowerCase();
          const email = (user.email || '').toLowerCase();
          
          return name.includes(normalizedQuery) || 
                email.includes(normalizedQuery);
        }).slice(0, MAX_SEARCH_RESULTS); // Limit results for performance
      } catch (error) {
        logger.error('User search error:', error);
        return []; // Return empty array on error rather than breaking UI
      }
    }
    

Read the full file on GitHub · 195 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 195 lines · 1,364 tokens per session scan A 068851898ed2

Subscribe to this mod's changes

self-review-before-submission is a cursor rule published in the GitHub repository SeanLF/weather-mcp (2 stars, last pushed 1y ago), licensed MIT. It adds 1,364 tokens to every session, about $0.0068 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.