Token导航 LogoToken导航

Agent Skill · 研究检索

population(population 搜索)

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

population 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为只读;许可证信息还不明确,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 59,803。

总安装 376周安装 16GitHub Stars 公开资料未说明下载 132核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/efesto-cloud/skills --skill population

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

population 用于查找、检索和筛选相关信息,适合根据关键词或任务场景快速定位候选结果。它能帮助 Agent 组织信息线索或缩小搜索范围,使用时需明确查询目标和筛选条件。通过 npx skills add 命令从指定 GitHub 仓库安装,需结合原始 README 确认具体用法。

安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写操作。population 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/population

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/efesto-cloud/skills --skill population;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它标注为只读,先用只读任务试一次,确认行为符合预期再扩大使用范围。

常见问题

6 条

population 怎么安装?

在终端执行 npx skills add https://github.com/efesto-cloud/skills --skill population。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

population 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

population 需要什么权限?

权限级别是只读。该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

population 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

population 用的人多吗?

公开数据是累计安装 376 次,近一周安装 16 次,下载 132 次。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

population 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。
  • 标注为只读权限,试用阶段不容易误改本地文件。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。
  • 只想先试试效果、不希望它改动本地文件的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
population

population 搜索 · 本页

376—只读未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Population Skill

Installation: If not already installed, add the required packages:

  • pnpm add @efesto-cloud/population (for Populate type and normalizePopulate helper)
  • pnpm add @efesto-cloud/mongodb-population (for BasePopulator and QueryBuilder classes)

Adds MongoDB population support — typed eager-loading of related documents via aggregation $lookup — to an existing entity. The entity, its DTO, document type, mapper, and repository are assumed to already exist. This skill only patches them where needed and writes the population infrastructure.

Scope: Shape type, QueryBuilder, Populator, plus targeted patches to entity, DTO, document, mapper, and repository interface/implementation.

Does not: create entities or repositories from scratch, write use cases, or manage DI container wiring.


Phase 0 — Clarify Intent

If the user has not specified which entity to populate and/or which fields should be populated, use AskUserQuestion to ask:

  1. Which entity needs population?
  2. Which fields should be populatable, and for each:

- What is the source collection/entity? - Is it a single value (1:1) or an array (1:many)? - Does the related entity itself have a populator already? (nested population)

Do not proceed until you have at least the entity name and one field to populate.


Phase 1 — Discover the Project Structure

Before touching any file, orient yourself:

  1. Find the collection enum — typically src/db/CollectionNameEnum.ts or similar. You'll need the collection name constant for $lookup.
  2. Check for existing populators — browse src/repo/shape/, src/repo/populate/, src/repo/query/. If any exist, read one to match the exact import style.
  3. Read the target entity — src/entity/FooEntity.ts
  4. Read the target DTO — src/dto/IFoo.ts
  5. Read the target document — src/db/Documents/FooDocument.ts
  6. Read the target mapper — src/mapper/FooMapper.ts
  7. Read the repository interface — src/repo/IFooRepo.ts
  8. Read the repository implementation — src/repo/impl/FooRepoImpl.ts

If src/repo/shape/ or src/repo/populate/ directories do not yet exist, create them.


Phase 2 — Patch Satellite Files

Patch each file only where something is actually missing. Do not rewrite files wholesale.

2a. Entity

For each populated field bar on entity Foo:

  • Props type must include an optional field for the populated value:

- 1:1 → bar: Bar | null (initialized to null in create()) - 1:many via foreign key on Bar → bars: Bar[] (initialized to [] in create())

  • create() static method — if the populated field has a meaningful default, accept it as an optional param. Typically bar is not passed to create() (it starts null/empty and is filled by the mapper after aggregation).
  • toDTO() — if the DTO has an optional bar? field, map it: bar: this.props.bar?.toDTO()?? null.
  • Getter — add get bar(): Bar | null (or Bar[]) if missing.
  • No populateBar() mutation method needed — the mapper sets the field directly after aggregation.

2b. DTO

For each populated field bar on IFoo:

  • Add bar?: IBar | null (optional — it may or may not be present depending on query).
  • For 1:many: bars?: IBar[].
  • If the DTO lives inside a namespace, add the field to the correct variant.
  • If a separate index.ts re-exports the DTO, no change needed there unless you added a new sub-type.

2c. Document

For each populated field bar on FooDocument:

  • Add bar?: BarDocument | null (always optional — absent on raw stored documents, present only after $lookup).
  • For 1:many: bars?: BarDocument[].
  • The FK reference field (bar_id: ObjectId | null) should already be present; do not add a second FK.

2d. Mapper

For each populated field bar, update FooMapper.from():

// After building the base entity:
if (doc.bar) {
    entity.props.bar = BarMapper.from(doc.bar);
}
// or for arrays:
if (doc.bars) {
    entity.props.bars = doc.bars.map(BarMapper.from);
}

The to() direction (entity → document) should not include populated fields — they are loaded, not saved, through this path.


Phase 3 — Write Population Core Files

Read the reference files before writing:

  • references/shape-example.ts — Shape types (leaf vs nested)
  • references/query-builder-example.ts — QueryBuilder with populateWith()
  • references/populator-example.ts — flat Populator (no nesting)
  • references/populator-nested-example.ts — nested Populator delegating to sub-populator

3a. Shape — src/repo/shape/FooShape.ts

// Leaf fields use `true`; fields whose related entity is also populatable use that entity's Shape type.
import type { BarShape } from './BarShape.js'; // only if Bar also has a populator

export type FooShape = {
    bar: true;           // 1:1, leaf — Bar has no further population
    items: true;         // 1:many, leaf
    baz: BazShape;       // 1:1, nested — Baz itself has populatable fields
};

3b. QueryBuilder — src/repo/query/FooQueryBuilder.ts

import { normalizePopulate, type Populate } from '@efesto-cloud/population';
import { QueryBuilder } from '@efesto-cloud/mongodb-population';
import FooDocument from '~/db/Documents/FooDocument.js';
import FooPopulator from '../populate/FooPopulator.js';
import type { FooShape } from '../shape/FooShape.js';

export default class FooQueryBuilder extends QueryBuilder<FooDocument> {
    populateWith(fields: Populate<FooShape> = {}): this {
        const normalized = normalizePopulate(fields, FooPopulator.SHAPE);
        const pipeline = FooPopulator.buildPipeline(normalized);
        this.push_populate_pipeline(pipeline);
        return this;
    }
}

3c. Populator — src/repo/populate/FooPopulator.ts

For each field:

  • 1:1 relationship (Bar lives in its own collection, Foo stores bar_id): use lookup + unwind.
  • 1:many relationship (Bar stores foo_id as FK, or Foo stores an array of IDs): use lookup only, no unwind.
  • Nested population (Bar itself has a populator): pass a sub-pipeline to the lookup. See references/populator-nested-example.ts.
import { BasePopulator, type NormalizedPopulate } from '@efesto-cloud/mongodb-population';
import CollectionNameEnum from '~/db/CollectionNameEnum.js';
import type TCollectionName from '~/db/TCollectionName.js';
import type { FooShape } from '../shape/FooShape.js';

export default class FooPopulator extends BasePopulator<FooShape, TCollectionName> {
    static readonly SHAPE: FooShape = {
        bar: true,
        items: true,
    };

    private bar(): void {
        if (!this.markPopulated('bar')) return;
        this.addStages(
            this.lookup({
                from: CollectionNameEnum.bar,   // collection name constant
                localField: 'bar_id',           // FK on Foo document
                foreignField: '_id',
                as: 'bar',
            }),
            this.unwind('bar'),                 // 1:1 — flatten array to single object
        );
    }

    private items(): void {
        if (!this.markPopulated('items')) return;
        this.addStages(
            this.lookup({
                from: CollectionNameEnum.item,
                localField: '_id',              // Foo's own _id
                foreignField: 'foo_id',         // FK on Item documents
                as: 'items',
            }),
            // No unwind — keeps the array
        );
    }

    populate(spec: NormalizedPopulate<FooShape>): this {
        if (spec.bar) this.bar();
        if (spec.items) this.items();
        return this;
    }

    static buildPipeline(spec: NormalizedPopulate<FooShape>): import('mongodb').Document[] {
        return new FooPopulator().populate(spec).build();
    }
}

Phase 4 — Patch the Repository

4a. Repository Interface — src/repo/IFooRepo.ts

Add the Options namespace with a populate field, and add options? param to every query method (save/saveMany/delete do not need it):

import type { Populate } from '@efesto-cloud/population';
import type { FooShape } from './shape/FooShape.js';

interface IFooRepo {
    search(query: IFooRepo.Search, options?: IFooRepo.Options): Promise<Foo[]>;
    get(id: ObjectId, options?: IFooRepo.Options): Promise<Maybe<Foo>>;
    findByIds(ids: ObjectId[], options?: IFooRepo.Options): Promise<Foo[]>;
    // ... other query methods
    save(entity: Foo): Promise<void>;
}

namespace IFooRepo {
    export type Options = {
        populate?: Populate<FooShape>;
    };
}

export default IFooRepo;

4b. Repository Implementation — src/repo/impl/FooRepoImpl.ts

Switch each query method to use FooQueryBuilder with .populateWith(options?.populate):

async get(id: ObjectId, options?: IFooRepo.Options): Promise<Maybe<Foo>> {
    const pipeline = new FooQueryBuilder()
        .match({ _id: id } as Filter<FooDocument>)
        .populateWith(options?.populate)
        .limit(1)
        .build();

    const results = await this.coll.aggregate<FooDocument>(
        pipeline, { session: this.db.session }
    ).toArray();

    if (results.length === 0) return Maybe.none();
    return Maybe.maybe(FooMapper.from(results[0]!));
}

Methods that already use aggregate() just need .populateWith(options?.populate) inserted into the builder chain. Methods that use findOne() or find() should be converted to aggregate() with the QueryBuilder.


Special Cases

Polymorphic entity (discriminated union)

If Foo has a type discriminator and different variants have different populatable fields:

  • The Shape can include all fields across variants: {fontFile: true; rasterFile: true; vectorFile: true;}.
  • In the populator, each private method populates only the relevant field — because $lookup on a non-existent FK just returns an empty array, which is then dropped by unwind or ignored.
  • Alternatively, if the variant shapes are completely disjoint, create separate Shape types with a union.

Nested population (the related entity also has a populator)

When Bar itself has a BarPopulator, you can pass a sub-pipeline into the $lookup:

private bar(nestedSpec: NormalizedPopulate<BarShape>): void {
    if (!this.markPopulated('bar')) return;
    const nestedPipeline = BarPopulator.buildPipeline(nestedSpec);
    this.addStages(
        this.lookup({
            from: CollectionNameEnum.bar,
            localField: 'bar_id',
            foreignField: '_id',
            as: 'bar',
            pipeline: nestedPipeline,    // <-- sub-population
        }),
        this.unwind('bar'),
    );
}

The Shape field must then be typed as BarShape (not true), and the populate() method receives spec.bar as a NormalizedPopulate<BarShape>.

$lookup with $in (Foo stores an array of IDs)

When Foo.bar_ids is an array of ObjectIds pointing to Bar documents:

this.lookup({
    from: CollectionNameEnum.bar,
    localField: 'bar_ids',   // array field on Foo
    foreignField: '_id',
    as: 'bars',
})
// No unwind — result is an array matching the IDs

Optional relationship (FK can be null)

For bar_id: ObjectId | null, the $lookup returns an empty array when FK is null. Use:

this.addStages(
    this.lookup({ from: CollectionNameEnum.bar, localField: 'bar_id', foreignField: '_id', as: 'bar' }),
    this.unwind('bar', { preserveNullAndEmptyArrays: true }),
);

Then in the mapper: entity.props.bar = doc.bar? BarMapper.from(doc.bar): null.


Phase 5 — Typecheck

Run the typecheck command for the core package then fix any errors before considering the task done.


Reference Files

  • references/shape-example.ts — Shape type examples with comments
  • references/query-builder-example.ts — Full QueryBuilder
  • references/populator-example.ts — Flat populator (leaf fields only)
  • references/populator-nested-example.ts — Populator with nested sub-population

平台分布

Codex

39.64%
按下载量换算52

Claude

28.89%
按下载量换算38

Cursor

19.05%
按下载量换算25

Gemini CLI

10.09%
按下载量换算13

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

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

继续浏览同类 Skills