一键导入
cove
cove active. all logic stays, only boilerplate dies. Trigger: /cove or "use cove"
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
cove active. all logic stays, only boilerplate dies. Trigger: /cove or "use cove"
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | cove |
| description | cove active. all logic stays, only boilerplate dies. Trigger: /cove or "use cove" |
cove active. all logic stays, only boilerplate dies.
ACTIVE EVERY RESPONSE. Still active if unsure. Off: "stop cove" / "normal code".
Default: full. Switch: /cove lite|full.
Drop:
let when type inferred or obviousmut|x| x → .identity()? suffices-> () when obviousUse:
Pattern: [what] [how].
Drop:
self in impl blocksMutex<T> when single-threaded: use Rc<RefCell<T>>Use:
Vec::with_capacity::<T>(n).filter().map().collect()if let Some(x) = foo() && x > 0fn f(_: i32) {}x if x < 0 => todo!()..Default::default() shorthand?. operator?? for Option/Result fallback.unwrap_or() / .map() chains over nested if-letsOption::ok_or() / .ok() for Result conversionjoin! for parallel independent awaitsselect! for race conditions❌ verbose:
let mut result = Vec::new();
for item in items.iter() {
if let Some(value) = item.get_value() {
result.push(value);
}
}
✅ full:
let result: Vec<_> = items.iter().filter_map(|i| i.get_value()).collect();
| Level | What change |
|---|---|
| lite | Remove mut, braces, verbose error handling. Keep readability |
| full | One-liners, chains, turbofish, let chains. Professional terse |
❌ verbose:
fn process_items(items: &[Item]) -> Result<Vec<ProcessedItem>, ProcessingError> {
let mut results = Vec::new();
for item in items.iter() {
let processed = item.process()?;
results.push(processed);
}
return Ok(results);
}
✅ full:
fn process_items(items: &[Item]) -> Result<Vec<ProcessedItem>, ProcessingError> {
items.iter().map(|i| i.process()).collect()
}
Drop:
self in method bodies (already in class)return when last expressionNone checks: if x is None → if not x (only when x not falsy primitive)if (a and b): → if a and b:list() / dict() / set() when comprehension works== True / == FalseUse:
[f(x) for x in items if x][y for x in data if (y := f(x))]y = x if cond else z.format()any(x > 0 for x in items)❌ verbose:
def process_items(items):
results = []
for item in items:
if item is not None:
value = item.get_value()
if value > 0:
results.append(value)
return results
✅ full:
def process_items(items):
return [i.get_value() for i in items if i and i.get_value() > 0]
Drop:
this-> (already in class)return when last expressionstd:: when using namespace std; or type obvious() around lambda return: []() { return x; } → [] { return x; }private: when class body is private by default (struct is public by default){ } around single statementsUse:
auto for type inferencefor (auto& x : items)[&](auto x) { return f(x); }std::erase / std::erase_if (C++20)[[nodiscard]] / [[maybe_unused]]std::optional / std::variant over pointer + sentinelconstexpr when known at compile timestd::views / ranges (C++20): items | std::views::filter(f) | std::views::transform(g)= default / = deleteauto f() -> int❌ verbose:
std::vector<int> process_items(const std::vector<Item>& items) {
std::vector<int> results;
for (auto it = items.begin(); it != items.end(); ++it) {
if ((*it).is_valid()) {
auto value = (*it).get_value();
if (value > 0) {
results.push_back(value);
}
}
}
return results;
}
✅ full:
auto process_items(const std::vector<Item>& items) -> std::vector<int> {
std::vector<int> results;
for (const auto& item : items)
if (item.is_valid() && item.get_value() > 0)
results.push_back(item.get_value());
return results;
}
Drop:
class="" / id="" when obvious<br> not <br/>type="text/javascript" in script tagstype="text/css" in style tagsdiv wrappersUse:
<main>, <nav>, <article>, <section>margin: 10px 5px over margin-top: 10px; margin-right: 5px; ...clip-path / filter over images for effectsaspect-ratio over padding hacksgap for spacing in flex/grid❌ verbose:
<div class="container">
<div class="row">
<div class="col-12 col-md-6">
<div class="card">
<div class="card-header">
<h3 class="card-title">Title</h3>
</div>
<div class="card-body">
<p class="card-text">Content goes here</p>
</div>
</div>
</div>
</div>
</div>
✅ cove:
<section class="card">
<h3>Title</h3>
<p>Content goes here</p>
</section>
❌ verbose:
.element {
margin-top: 10px;
margin-right: 0px;
margin-bottom: 10px;
margin-left: 0px;
padding-top: 5px;
padding-right: 10px;
padding-bottom: 5px;
padding-left: 10px;
}
✅ cove:
.element {
margin: 10px 0;
padding: 5px 10px;
}
Drop:
this.field (already in class)return when last expression() around lambdas: x -> { return x; } → x -> x{}public on interface methods (implicit)@Override when method clearly overrides (Lombok, etc.)<> when type inferredUse:
var for type inference (Java 10+)for (Item item : items)(x, y) -> x + yList.of() / Map.of() / Set.of() (immutable collections, Java 9+)Stream.ofNullable() / Optional.stream() (Java 9+)record Point(int x, int y) {}Objects.requireNonNullElse()String.join() over manual concatenation❌ verbose:
public List<Integer> processItems(List<Item> items) {
List<Integer> results = new ArrayList<Integer>();
for (Item item : items) {
if (item != null) {
int value = item.getValue();
if (value > 0) {
results.add(value);
}
}
}
return results;
}
✅ full:
List<Integer> processItems(List<Item> items) {
var results = new ArrayList<Integer>();
for (Item item : items)
if (item != null && item.getValue() > 0)
results.add(item.getValue());
return results;
}
Short output. All logic, no ceremony.
Drop:
System.out.println("value = " + x) → println!("{x}") / print("{x}") / console.log(x)console.log("debug", x, y) → console.log({x, y}) or dbg!(x)print() newline when println() cleanerstr() / to_string() in f-stringsUse:
console.log({user, action, count})dbg!() in Rustprint!() without newline for progress barsl = console.log (JS), log = println (Rust)clog / eprintln for errorsHH:MM:SS❌ verbose:
console.log("Processing item:", item.name, "with value:", item.value);
console.log("Result count:", results.length);
✅ full:
console.log({item: item.name, value: item.value});
console.log({count: results.length});
❌ verbose:
print("The result is:", str(result))
print(f"Processing item {item.name} with value {item.value}")
✅ full:
print(f"{result}")
print(f"{item.name}: {item.value}")
Drop:
$(...) when backticks work: `command` → $(command)echo "$VAR" → echo $VAR (unless needed)then/fi when single-line &&/|| worksfunction keyword (bash)#!/bin/bash when shebang not neededexit 0 at end of scriptif [ $x -eq 0 ]; then ... fiUse:
$() for command substitution[[ ]] over [ ] (bash)&& / || for simple conditionalslocal for variables in functionsset -e / set -u for safetygrep pattern <<< "$var"diff <(cmd1) <(cmd2)-r over --recursive_ for unused: cmd _ arg2❌ verbose:
#!/bin/bash
function process_files() {
local files=$(ls *.txt)
for file in $files; do
if [ -f "$file" ]; then
echo "Processing $file"
cat "$file" | grep "TODO"
fi
done
}
✅ full:
process_files() {
for f in *.txt; do
[[ -f $f ]] && grep "TODO" < "$f"
done
}
Drop:
function keyword when arrow functions cleanerreturn when last expression=== true / === falsenew Array() / new Object() → [] / {}if (x !== null && x !== undefined) → if (x != null)Use:
x => x * 2const { name, age } = user...args, { ...obj }`hello ${name}`obj?.foo?.barx ?? default.filter().map().find()for...of over for (let i = 0; ...) when index not neededconst by default, let only when reassign❌ verbose:
function processItems(items) {
var results = new Array();
for (var i = 0; i < items.length; i++) {
var item = items[i];
if (item !== null && item !== undefined) {
var value = item.value;
if (value > 0) {
results.push(value);
}
}
}
return results;
}
✅ cove:
const processItems = items =>
items?.filter(i => i?.value > 0).map(i => i.value) ?? []
❌ verbose:
const getFullName = (user) => {
if (user.firstName !== null && user.firstName !== undefined) {
return user.firstName + ' ' + user.lastName;
} else {
return 'Unknown';
}
}
✅ cove:
const getFullName = ({ firstName, lastName }) =>
firstName ? `${firstName} ${lastName}` : 'Unknown'
Auto-applies in most contextual technical situations.
Examples:
Borderline: when uncertain, always drill.
Ask "why" 5 times until root cause / logically sound answer.
why: users got charged twice
why: payment processor called twice
why: retry logic resends same request
why: timeout set too long
why: no circuit breaker
answer: no timeout protection
After every 5 whys, generate improvements:
root: no circuit breaker
idea 1: add idempotency key to payments [quick]
idea 2: add request deduplication [quick]
idea 3: add circuit breaker pattern [refactor]
idea 4: move to async job queue [defer]
idea 5: rewrite payment processor [never]
Prioritize by time vs impact.
Auto-applies when writing about code changes.
Examples:
Bullet-only. No essays. 2-5 bullets max.
❌ verbose:
I have implemented a new feature that allows users to search for products by their name. This is a very useful feature that was requested by the customer. It uses a database index to make the search fast. Please review.
✅ cove:
feat: add product search by name
- uses db index for performance
- addresses customer request
[TITE-123]
Auto-applies when writing about or showing tests.
Examples:
Minimal assertions. One concept per test.
❌ verbose:
def test_when_user_clicks_search_button_and_database_contains_matching_products_then_display_results_in_ui():
db = setup_test_database()
db.insert(Product(name="Widget A", price=100))
db.insert(Product(name="Widget B", price=200))
result = click_search_button("Widget")
assertEqual(len(result), 2)
assertEqual(result[0].name, "Widget A")
assertEqual(result[1].name, "Widget_B")
✅ cove:
def test_search_returns_matching_products():
db.insert(Product(name="Widget A", price=100))
result = search("Widget")
assert len(result) == 1
assert result[0].name == "Widget A"
Auto-applies when showing or describing errors.
Examples:
Short. Actionable. No stack trace novels.
❌ verbose:
We apologize for the inconvenience. An unexpected error occurred while attempting to save your document. This may have been caused by a temporary network issue or a problem with the storage subsystem. Please try saving again, and if the problem persists, contact support with error code 0x80070005.
✅ cove:
Save failed: disk full. Free 500MB to continue. [ERR_DISK_FULL]
Examples over explanation. Compressed.
Drop:
[options] when none existx --helpUse:
x -h / x --help / x helpx [subcommand] <arg> [-f flag]-h, -v, -f0 success, 1 error--version support❌ verbose:
Usage: myapp [command]
This is the main CLI entry point for myapp. You can use this tool to manage various aspects of your project including building, testing, and deploying your application.
Commands:
build Build the project from source
test Run the test suite
deploy Deploy the application to production
Options:
-h, --help Show this help message
-v, --verbose Enable verbose output
For more information, visit https://docs.example.com
✅ full:
x build|test|deploy [-h] [-v]
build compile sources
test run suite
deploy push to prod
-h help -v verbose
Terse install/usage. No marketing.
Drop:
Use:
❌ verbose:
# 🚀 SuperApp
[]()
The **most modern** and **fastest** application framework for building scalable microservices in the cloud.
## Features
- ⚡ Lightning fast
- 🔒 Secure by default
- 📦 Zero config
- 🌐 Multi-cloud
- 🧪 Fully tested
- 📚 Excellent documentation
## Getting Started
To get started with SuperApp, you'll need to have Node.js installed
on your machine. First, run the following command to install SuperApp
as a global dependency...
[continues for 500 more words]
✅ full:
# SuperApp
Build and deploy microservices.
## Install
`npm i -g superapp`
## Usage
`superapp build` compile
`superapp deploy` push to prod
## API
`new App(opts)` create app
`app.listen(port)` start server
docs: https://docs.example.com
Cross-cutting code practices for supported languages.
Drop:
new / new() when .create() or type inference worksUse:
?. / optional chaining over nested null checksNaming:
is_ / has_ / can_ for booleanscompute_, fetch_, apply_User, Config, Event_async suffix only when sync version existshandle_ prefix for event/callback handlersAsync:
await when ops independent (Rust: join!(a, b))join! over sequential await when results independentAbortController/CancellationToken (JS/.NET), CancellationToken (Rust)Security:
Performance:
& / borrowing)&& / || over if chainsNull/Optional:
?? / unwrap_or / get_or_insert_with over if let Some.map().unwrap_or() chains over nested if-letsCode/commits/PRs: write normal. "stop cove" or "normal code": revert.