Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

valuation-consistency-checks

БесплатноЗапускает вложенные скриптыНе проверен

Checks a finished valuation for internal consistency across its artifacts — currency agreement between cash flows and discount rate, terminal growth against…

lyndonklот lyndonkl★ 208 звёзд на GitHub

Об этом скилле

Valuation consistency checks

Most bad valuations contain no wrong number. They are internally inconsistent. Cash flows sit in one currency and the discount rate was built in another. Growth appears that nobody paid for. Terminal growth runs above the economy's. A method the company's own type rules out was used anyway.

Each of those looks defensible when you stare at it alone. Only a check that reads several artifacts at once catches them. That is what this script does.

Treat it as a loop, not a report:

run it  ->  fix what it flags  ->  run it again  ->  no errors left

You are done when the run comes back with zero errors and every warning has a written defence. A warning you cannot defend is an error you have not admitted yet.

The script

resources/validate.py — pure standard library, no installation needed. It reads JSON files by path and prints findings.

python3 resources/validate.py --capital capital.json --dcf dcf.json --classification cls.json
python3 resources/validate.py --dcf dcf.json --capital capital.json --quiet
python3 resources/validate.py --dcf dcf.json --capital capital.json --json
Flag Effect
--mandate --classification --capital --forecast --dcf --relative artifact paths
--quiet drop the INFO and SKIP lines, show only what needs work
--json machine-readable findings, plus error_count and passed

Exit code is 0 when nothing reached ERROR, and 1 otherwise. Nothing else changes the exit code — warnings never fail the run.

The artifacts it reads

Pass any subset. Every check whose inputs are missing is skipped and printed as a SKIP line with the reason, so the gate is useful part-way through an analysis. Running with only a cost of capital artifact is a legitimate thing to do.

Flag What it is Where it comes from Fields read
--mandate the brief: what is being valued, in what currency, as of when you write it currency
--classification the company's type and the hard stops that follow you write it constraints[]
--capital the discount rate build cost-of-capital-toolkit, wacc subcommand currency, riskfree_rate, levered_beta, weights{}
--forecast the driver forecast feeding the DCF your driver file currency
--dcf the valuation itself dcf-valuation-engine, value subcommand terminal{}, forecast[], bridge{}, value_per_share, terminal_value_share_of_total, method, failure.probability, currency
--relative the multiples work, if any relative-valuation-toolkit multiples[].multiple

Building the capital artifact

The wacc subcommand of cost-of-capital-toolkit returns weights and currency but not the riskfree rate or the beta, because those were its inputs. Merge the input payload and the output into one file:

{
  "currency": "USD",
  "riskfree_rate": 0.0275,
  "levered_beta": 1.0013,
  "wacc": 0.0781,
  "weights": {"equity": 0.8988, "debt": 0.1012, "preferred": 0.0}
}

riskfree_rate may also sit at cost_of_equity.riskfree_rate, and the beta may sit at beta.levered. Either nesting is read.

Building the DCF artifact

The output of dcf.py value is already the right shape, with one gap: it carries no method field. Add one so the constraint check can see which model was used.

python3 ../dcf-valuation-engine/resources/dcf.py value --in drivers.json > dcf.json
# then add "method": "fcff" (or "fcfe", "ddm", "excess_return") to dcf.json

Set currency in the DCF drivers file. It is copied through to the result, and without it the currency check has nothing to compare.

Writing the classification artifact

Nothing produces this. You write it after deciding what kind of company this is. It records the hard stops that the company's type imposes, so that a later run cannot quietly ignore them.

{
  "company": "Deutsche Bank",
  "buckets": ["financial-service"],
  "constraints": [
    {"rule": "no-fcff-valuation", "because": "debt is raw material for a bank"},
    {"rule": "require-failure-probability", "because": "crisis bank, equity can be wiped"}
  ]
}

Constraints may be plain strings or objects with a rule key. Three rule names are enforced:

Rule Fires when Set it for
no-fcff-valuation the DCF method contains fcff banks, insurers, anything where debt is raw material
require-failure-probability failure.probability is absent or zero young firms, distressed firms, high leverage, political risk
no-earnings-multiple a relative valuation used PE, P/E or EV/EBIT negative earnings, or a cycle trough

Any other rule name is recorded and counted but not enforced. That is deliberate: writing down a constraint the script cannot test is still better than not writing it down.

The severity model

Severity Meaning What you owe
ERROR an in
Полный SKILL.md на GitHub

Установить valuation-consistency-checks в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

resources/validate.py

FAQ

Что делает скилл valuation-consistency-checks?

Checks a finished valuation for internal consistency across its artifacts — currency agreement between cash flows and discount rate, terminal growth against the riskfree ceiling, reinvestment that pays for the growth assumed, perpetual excess returns, capital weights and beta range, equity bridge arithmetic, tax rates, and the hard constraints a company's type imposes. Grades each finding ERROR, WARN or INFO and exits 1 on any error, so it can gate a pipeline. Use before accepting a DCF, when reviewing someone else's model, when a value looks too high, or when checking terminal value assumptions, growth-versus-reinvestment consistency, currency consistency, or an equity bridge that does not tie.

Как установить скилл valuation-consistency-checks?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл valuation-consistency-checks запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить valuation-consistency-checks с