Xpersona
C

code-quality-principles

CLAWHUB · Unverified

Applies KISS, YAGNI, and SOLID principles for clean code with reduced complexity Skill: code-quality-principles Owner: athola Summary: Applies KISS, YAGNI, and SOLID principles for clean code with reduced complexity Tags: latest:1.9.19 Version history: v1.9.19 | 2026-08-26T13:09:40.692Z | user Release v1.9.19 v1.9.17 | 2026-07-30T05:32:06.977Z | user Release v1.9.17 v1.9.16 | 2026-07-14T19:48:55.511Z | user Release v1.9.16 v1.9.15 | 2026-07-04T21:22:28.507Z | user Release v1.9.15 v1.9.14 | 2026-0

62
Rank
84
Safety
1.8k
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 1.8K downloads reported by the source. Last updated 10/10/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Install and run

Setup complexity: low.

clawhub skill install s17emme0e2m3cpf7k2jvp3a84984b8z9:nm-conserve-code-quality-principles
  1. Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.
  2. Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-athola-nm-conserve-code-quality-principles/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

102,667 characters of source documentation, loaded on request.

Extracted files

3 files captured from the source.

SKILL.md

---
name: code-quality-principles
description: Applies KISS, YAGNI, and SOLID principles for clean code with reduced complexity
version: 1.9.8
triggers:
  - design
  - principles
  - clean-code
  - architecture
  - refactoring or reviewing code for over-engineering
metadata: {"openclaw": {"homepage": "https://github.com/athola/claude-night-market/tree/master/plugins/conserve", "emoji": "\ud83e\udd9e"}}
source: claude-night-market
source_plugin: conserve
---

> **Night Market Skill** — ported from [claude-night-market/conserve](https://github.com/athola/claude-night-market/tree/master/plugins/conserve). For the full experience with agents, hooks, and commands, install the Claude Code plugin.


# Code Quality Principles

Guidance on KISS, YAGNI, and SOLID principles with language-specific examples.


## When To Use

- Improving code readability and maintainability
- Applying SOLID, KISS, YAGNI principles during refactoring

## When NOT To Use

- Throwaway scripts or one-time data migrations
- Performance-critical code where readability trades are justified

## KISS (Keep It Simple, Stupid)

**Principle**: Avoid unnecessary complexity. Prefer obvious solutions over clever ones.

### Guidelines

| Prefer | Avoid |
|--------|-------|
| Simple conditionals | Complex regex for simple checks |
| Explicit code | Magic numbers/strings |
| Standard patterns | Clever shortcuts |
| Direct solutions | Over-abstracted layers |

### Python Example

```python
# Bad: Overly clever one-liner
users = [u for u in (db.get(id) for id in ids) if u and u.active and not u.banned]

# Good: Clear and readable
users = []
for user_id in ids:
    user = db.get(user_id)
    if user and user.active and not user.banned:
        users.append(user)
```

### Rust Example

```rust
// Bad: Unnecessary complexity
fn process(data: &[u8]) -> Result<Vec<u8>, Box<dyn std::error::Error>> {
    data.iter()
        .map(|&b| b.checked_add(1).ok_or("overflow"))
        .collect::<Result<Vec<_>, _>>()
        .map_err(|e| e.into())
}

// Good: Simple and clear
fn process(data: &[u8]) -> Result<Vec<u8>, &'static str> {
    let mut result = Vec::with_capacity(data.len());
    for &byte in data {
        result.push(byte.checked_add(1).ok_or("overflow")?);
    }
    Ok(result)
}
```

## YAGNI (You Aren't Gonna Need It)

**Principle**: Don't implement features until they are actually needed.

### Guidelines

| Do | Don't |
|----|-------|
| Solve current problem | Build for hypothetical futures |
| Add when 3rd use case appears | Create abstractions for 1 use case |
| Delete dead code | Keep "just in case" code |
| Minimal viable solution | Premature optimization |

### Python Example

```python
# Bad: Premature abstraction for one use case
class AbstractDataProcessor:
    def process(self, data): ...
    def validate(self, data): ...
    def transform(self, data): ...

class CSVProcessor(AbstractDataProcessor):
    def process(self, data):
        return self.transform(self.validate(data))

# Good:

_meta.json

{
  "ownerId": "kn7d107jg9jv602h9ytsegydq184a42s",
  "slug": "nm-conserve-code-quality-principles",
  "version": "1.9.19",
  "publishedAt": 1787749780692
}

skill-card.md

## Description:

Applies KISS, YAGNI, and SOLID principles for clean code with reduced complexity.

This skill is ready for commercial/non-commercial use.

## Publisher:

[athola](https://clawhub.ai/user/athola)

### License/Terms of Use:

MIT-0

## Use Case:

Developers and engineers use this skill during design, refactoring, and code review to keep implementations simple, maintainable, and grounded in KISS, YAGNI, and SOLID principles.

### Deployment Geography for Use:

Global

## Known Risks and Mitigations:

Risk: Broad trigger terms may activate this guidance during general design or architecture conversations.

Mitigation: Use the guidance when code quality principles are relevant, and confirm recommendations against the specific task before applying changes.

## Reference(s):

- [ClawHub Skill Page](https://clawhub.ai/athola/skills/nm-conserve-code-quality-principles)
- [OpenClaw Homepage](https://github.com/athola/claude-night-market/tree/master/plugins/conserve)

## Skill Output:

**Output Type(s):** [Guidance, Markdown, Code, Shell commands]

**Output Format:** [Markdown with prose, checklists, tables, and code blocks]

**Output Parameters:** [1D]

**Other Properties Related to Output:** [No external credentials or services are required; includes optional local verification commands.]

## Skill Version(s):

1.9.19 (source: server release metadata)

## Ethical Considerations:

Users should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.

Sponsored

Ads related to code-quality-principles and adjacent AI workflows.