Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问clear审计通过

formula-protection配方保护

Agent Skill

formula-protection 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

412

周安装

17

GitHub Stars

302

下载量

135
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:formula-protection(配方保护)
来源仓库:https://github.com/aojdevstudio/finance-guru
仓库路径:skills/formula-protection
安装命令:
npx skills add https://github.com/aojdevstudio/finance-guru --skill formula-protection
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/aojdevstudio/finance-guru --skill formula-protection

简介

formula-protection 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中快速定位候选结果。

  • 适用于需要根据关键词或任务场景进行信息检索的研究与数据筛选场景。
  • 通过关键词、来源仓库或 README 文档来核验具体用法和功能细节。
  • 安装前需确认权限范围、维护状态及是否触发联网或文件操作。
  • 建议结合原始仓库和安装命令进一步验证实际能力与使用边界。

SKILL.md

Formula Protection

Purpose

GUARDRAIL SKILL - Prevents accidental modification or deletion of critical formulas that maintain spreadsheet integrity. Ensures financial data accuracy by protecting auto-calculated columns.

When to Use (Auto-Blocks)

This skill automatically blocks when detecting:

  • Attempts to "update formula", "modify formula", "change formula"
  • Editing Column C (GOOGLEFINANCE price formulas)
  • Modifying Columns D-F, H-S (calculated formulas)
  • Fixing formula errors (#N/A, #DIV/0!, #REF!) without proper protocol
  • User mentions: "fix formula", "edit cell", "update column C/D/E"

This is a BLOCKING skill - You MUST use this skill before proceeding with any formula-related edits.

Sacred Formulas (NEVER TOUCH)

DataHub Tab

Column C: Last Price

=GOOGLEFINANCE(A2, "price")
  • Auto-updates stock prices in real-time
  • NEVER modify - prices must come from Google Finance
  • NEVER replace with static values
  • ONLY wrap with IFERROR if showing #N/A for delisted stocks

Columns D-E: $ Change, % Change

=C2 - G2  ($ Change)
=D2 / G2  (% Change)
  • Calculated from Last Price (C) and Avg Cost Basis (G)
  • NEVER touch - let formulas calculate automatically

Columns H-M: Gains/Losses

=L2 - M2  (Total G/L $)
=K2 / M2  (Total G/L %)
=B2 * C2  (Current Value)
=B2 * G2  (Cost Basis Total)
  • Core portfolio performance metrics
  • NEVER modify - accuracy depends on these formulas
  • ONLY add IFERROR if #DIV/0! errors appear

Columns N-S: Advanced Metrics

  • Contains ranges, dividend data, layer classifications
  • Mix of formulas and manual classifications
  • ⚠️ Consult spreadsheet-architecture.md before editing

Dividend Tracker Tab

Column F: Total Dividend $

=D2 * E2  (Shares × Dividend Per Share)
  • Calculates expected dividend income per fund
  • NEVER modify - must remain formula-driven

Total Row Formula

=SUM(F2:F50)  (TOTAL EXPECTED DIVIDENDS)
  • Sums all dividend income
  • NEVER delete or modify
  • ONLY expand range if data grows beyond row 50

Margin Dashboard Tab

Coverage Ratio

=IFERROR(B10 / B11, 0)  (Dividends ÷ Interest Cost)
  • Critical safety metric for margin strategy
  • NEVER remove IFERROR wrapper
  • ONLY update if adding new safety thresholds

Allowed Operations

✅ SAFE: Add IFERROR() Wrappers

Purpose: Prevent error display without changing logic

Example:

Before: =GOOGLEFINANCE(A2, "price")
After: =IFERROR(GOOGLEFINANCE(A2, "price"), "N/A")

Before: =B10 / B11
After: =IFERROR(B10 / B11, 0)

When to use:

  • #N/A errors from delisted stocks (GOOGLEFINANCE failures)
  • #DIV/0! errors when margin balance = $0
  • #REF! errors from deleted rows (use IFERROR as temporary fix)

✅ SAFE: Fix Broken Sheet References

Purpose: Correct renamed or moved sheet names

Example:

Before: =Sheet1!A1
After: ='DataHub'!A1

Before: ='Dividend Tracker OLD'!B10
After: ='Dividend Tracker'!B10

When to use:

  • Sheet was renamed (Sheet1 → DataHub)
  • Sheet was duplicated and old reference remains
  • Tab moved to different position

✅ SAFE: Expand Formula Ranges

Purpose: Include new data rows without changing logic

Example:

Before: =SUM(F2:F50)
After: =SUM(F2:F100)

Before: =AVERAGE(B2:B30)
After: =AVERAGE(B2:B50)

When to use:

  • New portfolio positions added beyond row 50
  • Dividend tracker grows beyond expected size
  • Margin dashboard accumulates monthly entries

✅ SAFE: Fix Cell Reference Typos

Purpose: Correct obvious mistakes in formula construction

Example:

Before: =B100 * C100  (B100 doesn't exist)
After: =B10 * C10

Before: =A2 + A2  (duplicate cell reference)
After: =A2 + B2  (correct cells)

When to use:

  • Formula references non-existent row
  • Clear typo in cell reference
  • Formula clearly broken due to manual error

Forbidden Operations

❌ NEVER: Change Formula Logic

Example of what NOT to do:

❌ =SUM(F2:F50) → =AVERAGE(F2:F50)  (changes meaning)
❌ =B2 * C2 → =B2 + C2  (changes calculation)
❌ =GOOGLEFINANCE(A2, "price") → =GOOGLEFINANCE(A2, "volume")

Why: Changes the meaning of calculated data, breaks dashboard integrity

❌ NEVER: Replace Formulas with Static Values

Example of what NOT to do:

❌ =GOOGLEFINANCE("TSLA", "price") → 445.47  (hardcoded)
❌ =B2 * C2 → 32964.78  (static value)
❌ =SUM(F2:F50) → 2847.32  (loses dynamic calculation)

Why: Data becomes stale, no longer updates automatically

❌ NEVER: Delete Formulas

Example of what NOT to do:

❌ Deleting Column C (Last Price formulas) to "clean up"
❌ Removing total row formulas to "simplify"
❌ Clearing formula cells to "start fresh"

Why: Destroys data pipeline, breaks all dependent calculations

❌ NEVER: Modify GOOGLEFINANCE Parameters

Example of what NOT to do:

❌ =GOOGLEFINANCE(A2, "price") → =GOOGLEFINANCE(A2, "closeyest")
❌ =GOOGLEFINANCE("TSLA", "price") → =GOOGLEFINANCE("NASDAQ:TSLA", "price")

Why: May break price lookups, change data source unexpectedly

Smart Formula Repair Workflow

Step 1: Identify Error Type

Scan spreadsheet for:

  • #N/A (not available - usually GOOGLEFINANCE or VLOOKUP failures)
  • #DIV/0! (division by zero - usually margin calculations when balance = $0)
  • #REF! (reference error - deleted rows/columns)
  • #VALUE! (wrong data type - rare in financial sheets)

Step 2: Classify Repair Strategy

For #N/A Errors:

GOOGLEFINANCE failures (Column C):

Cause: Stock delisted, ticker invalid, or Google Finance API issue
Solution: Wrap with IFERROR()
=IFERROR(GOOGLEFINANCE(A2, "price"), "DELISTED")

VLOOKUP failures (if used):

Cause: Lookup value doesn't exist in source data
Solution: Check source data exists, expand range, or add IFERROR()
=IFERROR(VLOOKUP(A2, Data!A:B, 2, FALSE), "NOT FOUND")

For #DIV/0! Errors:

Margin coverage ratio (when margin = $0):

Before: =B10 / B11
After: =IFERROR(B10 / B11, 0)

Percentage calculations (when denominator = 0):

Before: =K2 / M2
After: =IFERROR(K2 / M2, 0)

For #REF! Errors:

Deleted rows/columns:

Cause: Formula references Sheet1!A10 but row 10 was deleted
Solution: If temporary, wrap with IFERROR(). If permanent, reconstruct formula.
Temporary: =IFERROR(Sheet1!A10, 0)
Permanent: Identify correct new reference and update

Step 3: Test Repair on Single Cell

Before applying broadly:

  1. Copy original formula to notes (for rollback)
  2. Apply repair to ONE cell
  3. Verify result looks correct
  4. Check no new errors introduced
  5. If successful, apply to other similar errors

Step 4: Validate No New Errors

After repair:

  • Scan entire sheet for new #N/A, #DIV/0!, #REF!
  • Verify totals still sum correctly
  • Check formulas still reference correct cells
  • Confirm no unexpected data changes

Step 5: Document Repair

Log all changes:

✅ Fixed #DIV/0! in Margin Dashboard C10 by adding IFERROR()
Formula change: =B10/B11 → =IFERROR(B10/B11, 0)
Reason: Margin balance was $0 causing division by zero
Date: 2025-11-11

Pre-Flight Checklist (Before Editing Formulas)

Ask yourself:

  • Am I trying to modify a formula-based column? (C, D-F, H-S)
  • Is this a GOOGLEFINANCE formula? (STOP - don't touch)
  • Is this a total/summary formula? (STOP - don't touch)
  • Am I changing formula logic? (STOP - forbidden)
  • Am I replacing formula with static value? (STOP - forbidden)
  • Am I adding IFERROR to existing formula? (✅ Allowed)
  • Am I fixing a broken sheet reference? (✅ Allowed)
  • Am I expanding a range for new data? (✅ Allowed)
  • Have I consulted spreadsheet-architecture.md? (Required)

If ANY stop condition triggered: Use this skill, review rules, proceed with caution

Emergency Rollback Procedure

If formula modification breaks the spreadsheet:

  1. STOP immediately - Do not attempt additional fixes
  2. Alert user - Clearly explain what went wrong
  3. Document the error:

- Which cell/column was modified - What formula change was made - What error occurred (new #N/A, wrong calculations, etc.)

  1. Restore from Google Sheets version history:

- File → Version History → See Version History - Find last working version (before modification) - Click "Restore this version"

  1. Learn from it - Update this skill if new edge case discovered

Example Scenarios

❌ WRONG: Modifying Last Price Formula

User request: "The price for TSLA isn't updating, let me fix the formula"

Agent response:

🛑 BLOCKED by formula-protection skill

You're attempting to modify Column C (Last Price) which contains GOOGLEFINANCE formulas.
These are sacred formulas and must NEVER be modified.

If TSLA price isn't updating, the issue is likely:
1. Google Finance API delay (wait 5-10 minutes)
2. Market is closed (prices only update during trading hours)
3. Ticker symbol incorrect (verify "TSLA" is correct)

❌ Do NOT modify =GOOGLEFINANCE(A2, "price")
✅ If truly broken, wrap with: =IFERROR(GOOGLEFINANCE(A2, "price"), "N/A")

✅ RIGHT: Adding IFERROR Wrapper

User request: "Column C shows #N/A for delisted stock, can you fix?"

Agent response:

✅ Using formula-protection skill

I'll safely wrap the GOOGLEFINANCE formula with IFERROR() to handle the delisted stock.

Before: =GOOGLEFINANCE(A45, "price")
After: =IFERROR(GOOGLEFINANCE(A45, "price"), "DELISTED")

This preserves the formula logic while displaying "DELISTED" instead of #N/A.
The formula will still work if the stock relists in the future.

✅ Safe operation - formula logic unchanged

✅ RIGHT: Expanding Summary Range

User request: "Total dividends formula only goes to row 50, but I have 55 funds now"

Agent response:

✅ Using formula-protection skill

I'll safely expand the SUM range to include all 55 funds.

Before: =SUM(F2:F50)
After: =SUM(F2:F100)

This expands the range to accommodate current data (55 funds) plus room for growth.
Formula logic unchanged - still summing Total Dividend $ column.

✅ Safe operation - range expanded, logic preserved

Google Sheets Integration

Spreadsheet ID: Read from fin-guru/data/user-profile.yamlgoogle_sheets.portfolio_tracker.spreadsheet_id

Use the mcp__gdrive__sheets tool:

Read-only operations (to detect formula errors):

// STEP 1: Read Spreadsheet ID from user profile
// Load fin-guru/data/user-profile.yaml
// Extract: google_sheets.portfolio_tracker.spreadsheet_id

// STEP 2: Scan for errors
mcp__gdrive__sheets(
    operation: "spreadsheets.values.get",
    params: {
        spreadsheetId: SPREADSHEET_ID,  // from user-profile.yaml
        range: "DataHub!A1:Z100"
    }
)
// Check for #N/A, #DIV/0!, #REF! in returned values

Write operations (only for safe repairs):

// Add IFERROR wrapper to fix formula errors
mcp__gdrive__sheets(
    operation: "spreadsheets.values.update",
    params: {
        spreadsheetId: SPREADSHEET_ID,  // from user-profile.yaml
        range: "DataHub!C2:C2",
        valueInputOption: "USER_ENTERED",
        requestBody: {
            values: [["=IFERROR(GOOGLEFINANCE(A2, \"price\"), \"N/A\")"]]
        }
    }
)

Agent Permissions

Builder (Write-enabled with formula-protection):

  • Can add IFERROR wrappers
  • Can fix broken sheet references
  • Can expand formula ranges
  • Can fix cell reference typos
  • MUST follow this skill's rules

All Other Agents (Strictly Read-only):

  • Market Researcher, Quant Analyst, Strategy Advisor, Margin Specialist, Dividend Specialist
  • Can read all data including formulas
  • CANNOT modify any formulas
  • Must defer to Builder for any formula repairs
  • Should alert Builder if formula errors detected

Reference Files

For complete details, see:

  • Spreadsheet Architecture: fin-guru/data/spreadsheet-architecture.md (lines 380-440)
  • Quick Reference: fin-guru/data/spreadsheet-quick-ref.md
  • Agent Permissions: fin-guru/data/spreadsheet-architecture.md (lines 91-136)

Key Takeaways

Remember:

  • 🛑 Formulas are sacred - Default assumption is DON'T TOUCH
  • IFERROR is your friend - Safe way to handle errors
  • 📖 Consult docs first - Read spreadsheet-architecture.md before any edit
  • 🤝 Ask user if unsure - Better to ask than break financial data
  • 🔄 Google Sheets has version history - Mistakes can be rolled back

When in doubt: READ-ONLY and ASK USER for guidance.


Skill Type: Guardrail (safety mechanism) Enforcement: BLOCK (prevents formula modifications) Priority: Critical Line Count: < 500 (following 500-line rule) ✅

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

31.38%
按下载量换算42

windsurf

21.69%
按下载量换算29

trae

18.69%
按下载量换算25

OpenCode

14.29%
按下载量换算19

Codex

8.45%
按下载量换算11

Antigravity

3.73%
按下载量换算5

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills