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

dayuse-vibes日用氛围

Agent Skill

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

总安装

288

周安装

12

GitHub Stars

2

下载量

96
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/dayuse-labs/skills-portfolio --skill dayuse-vibes

简介

dayuse-vibes 确保为非开发者生成的代码符合专业标准,强制使用严格 TypeScript 与 Zod 输入验证。

  • 它推行 DDD 架构、系统化测试与 Result 模式,禁止 any 类型与异常捕获,提升代码健壮性。
  • 使用时所有输出必须通过 ESLint 与 Prettier 校验,适合生成面向终端用户的业务逻辑代码。
  • 安装后需在项目中配置对应 lint 规则,并集成测试框架以保证覆盖率达标。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Dayuse Vibe Coding Standards

This skill ensures that code generated for non-developers meets professional standards while remaining understandable.

Core Principles

When generating code, you MUST follow these rules:

  1. TypeScript only - All code must use strict TypeScript
  2. No any type - The any type is strictly forbidden
  3. DDD Architecture - Organize code according to Domain-Driven Design
  4. Systematic testing - Every feature requires tests
  5. Mandatory linting - Code must pass ESLint and Prettier
  6. Zod validation - Validate external inputs with Zod
  7. Result Pattern - Use Result<T, E> instead of throw/catch
  8. Security by default - Security audit, authorization checks, and no hardcoded secrets

DDD Architecture

Organize code into 4 distinct layers:

src/
├── domain/           # Business logic (THE WHAT)
│   ├── entities/     # Business objects with identity
│   ├── value-objects/# Immutable objects without identity
│   ├── repositories/ # Data access interfaces
│   └── services/     # Complex business operations
│
├── application/      # Use Cases (THE HOW)
│   ├── use-cases/    # Unit business operations
│   └── dtos/         # Data Transfer Objects
│
├── infrastructure/   # Technical details (THE WHERE)
│   ├── repositories/ # DB/API implementations
│   ├── services/     # External services
│   └── persistence/  # DB configuration
│
└── interfaces/       # Entry points (THE WHO)
    ├── http/         # REST controllers
    ├── cli/          # CLI commands
    └── events/       # Event handlers

Layer Rules

LayerDepends onContains
DomainNothingEntities, Value Objects, Repository Interfaces
ApplicationDomainUse Cases, DTOs
InfrastructureDomainRepository Implementations, External services
InterfacesApplicationControllers, CLI, Event Handlers

Strict TypeScript

Required Configuration

All projects must have the following in tsconfig.json:

{
  "compilerOptions": {
    "strict": true,
    "noImplicitAny": true,
    "strictNullChecks": true,
    "noImplicitReturns": true,
    "noUncheckedIndexedAccess": true
  }
}

Alternatives to the any Type

Instead of anyUseWhen
anyunknownTruly unknown type (requires Type Guard)
any[]T[]Typed arrays
anySpecific interfaceKnown structure
anyUnion typesMultiple possible types
anyGeneric <T>Reusable components
anyRecord<string, unknown>Object dictionaries

Type Guard Pattern

function isUser(value: unknown): value is User {
  return (
    typeof value === 'object' &&
    value !== null &&
    'id' in value &&
    'name' in value
  );
}

Validation with Zod

Use Zod to validate ALL external inputs:

import { z } from 'zod';

// Define the schema
const CreateUserSchema = z.object({
  name: z.string().min(2).max(100),
  email: z.string().email(),
  age: z.number().int().positive().optional(),
});

// Infer the TypeScript type
type CreateUserInput = z.infer<typeof CreateUserSchema>;

// Validate data
function validateInput(data: unknown): Result<CreateUserInput, ValidationError> {
  const result = CreateUserSchema.safeParse(data);
  if (!result.success) {
    return err(new ValidationError(result.error.issues));
  }
  return ok(result.data);
}

Result Pattern

Never use throw/catch for business errors. Use the Result Pattern instead:

type Result<T, E = Error> =
  | { success: true; data: T }
  | { success: false; error: E };

// Helpers
const ok = <T>(data: T): Result<T, never> => ({ success: true, data });
const err = <E>(error: E): Result<never, E> => ({ success: false, error });

// Usage
function createUser(input: CreateUserInput): Result<User, UserError> {
  if (await userExists(input.email)) {
    return err(new EmailAlreadyExistsError(input.email));
  }
  const user = new User(generateId(), input.name, input.email);
  return ok(user);
}

// Consumption
const result = createUser(input);
if (!result.success) {
  // Handle the error
  return handleError(result.error);
}
// Use result.data

Security and Authorization (Zero Trust)

The AI must adopt a Zero Trust approach: never trust inputs or implicit state.

1. Systematic Authorization Checks

Every business action must verify WHO is performing it and whether they have the RIGHT to do so.

// ❌ BAD: Assumes the user has permission because they are authenticated
function deleteProject(projectId: string, user: User) {
  return projectRepo.delete(projectId);
}

// ✅ GOOD: Explicit permission check (Business Logic)
function deleteProject(projectId: string, user: User): Result<void, AppError> {
  const project = await projectRepo.findById(projectId);

  // Ownership or role check
  if (project.ownerId !== user.id && user.role !== 'ADMIN') {
    return err(new UnauthorizedError("You do not have permission to delete this project"));
  }

  return projectRepo.delete(projectId);
}

2. No Hardcoded Secrets

NEVER write API keys, tokens, passwords, or certificates directly in code.

// ❌ FORBIDDEN
const API_KEY = "sk-1234567890abcdef";

// ✅ REQUIRED
const API_KEY = process.env.OPENAI_API_KEY;

3. Input Sanitization

Never insert raw user data into:

  • HTML (XSS risk)
  • SQL queries (SQL Injection risk)
  • System commands (Command Injection risk)

Use Zod to validate the format and escaping libraries for display.


Testing with Vitest

Test Location

Place tests alongside source files:

src/domain/entities/
├── user.ts
└── user.test.ts

Test Structure

import { describe, it, expect, beforeEach } from 'vitest';

describe('User', () => {
  describe('changeName', () => {
    it('should update name when valid', () => {
      // Arrange
      const user = new User('1', 'John', email);

      // Act
      user.changeName('Jane');

      // Assert
      expect(user.name).toBe('Jane');
    });

    it('should return error when name too short', () => {
      const user = new User('1', 'John', email);
      const result = user.changeName('J');
      expect(result.success).toBe(false);
    });
  });
});

Tests Required For

  • All domain Entities and Value Objects
  • All application Use Cases
  • All public functions
  • Edge cases and error handling

Linting

Commands to Run

Before completing ANY code task:

npm run lint        # Check for issues
npm run lint:fix    # Auto-fix issues
npm run format      # Format with Prettier
npm run test        # Run tests

Full Verification Script

npm run lint:fix && npm run format && npm run test

Code Generation Workflow

For each new feature:

1. Determine the Layer

  • Pure business logic? -> domain/
  • Operation orchestration? -> application/
  • External integration? -> infrastructure/
  • Entry point? -> interfaces/

2. Create with Proper Types

  • Define interfaces first
  • Use explicit types everywhere
  • Never use any
  • Validate inputs with Zod

3. Handle Errors with Result

  • Define specific error types
  • Return Result instead of throw
  • Document error cases

4. Write Tests

  • Create the test file alongside the source
  • Test the happy path
  • Test error cases

5. Verify Quality

npm run lint:fix && npm run format && npm run test

Naming Conventions

TypeConventionExample
Fileskebab-caseuser-repository.ts
ClassesPascalCaseUserRepository
InterfacesPascalCaseUserRepository
FunctionscamelCasecreateUser
ConstantsSCREAMING_SNAKEMAX_RETRY_COUNT
TypesPascalCaseCreateUserDTO
Zod SchemasPascalCase + SchemaCreateUserSchema

Additional Resources

For detailed guides, refer to:


Quick Reference

ALWAYS:
✓ Strict TypeScript
✓ Explicit types everywhere
✓ Tests for all code
✓ Linter before finishing
✓ DDD structure
✓ Zod for external inputs
✓ Result for business errors
✓ Permission checks

NEVER:
✗ any type
✗ Skip tests
✗ Ignore linter errors
✗ Infrastructure logic in domain
✗ throw/catch for business errors
✗ Unvalidated data
✗ Hardcoded secrets/API keys

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

33.65%
按下载量换算32

Claude

31.2%
按下载量换算30

Cursor

18.38%
按下载量换算18

Gemini CLI

10.01%
按下载量换算10

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

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

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills