重要前提
安装AI Skills的关键前提是:必须科学上网,且开启TUN模式,这一点至关重要,直接决定安装能否顺利完成,在此郑重提醒三遍:科学上网,科学上网,科学上网。查看完整安装教程 →
Apify by danielmiessler/personal_ai_infrastructure
npx skills add https://github.com/danielmiessler/personal_ai_infrastructure --skill Apify执行前,请检查用户自定义配置位于: ~/.claude/skills/CORE/USER/SKILLCUSTOMIZATIONS/Apify/
如果此目录存在,则加载并应用在那里找到的任何 PREFERENCES.md、配置或资源。这些将覆盖默认行为。如果目录不存在,则使用技能默认设置。
当此技能被调用时,你必须先发送此通知,然后再执行任何其他操作。
发送语音通知:
curl -s -X POST http://localhost:8888/notify
-H "Content-Type: application/json"
-d '{"message": "Running the WORKFLOWNAME workflow in the Apify skill to ACTION"}'
> /dev/null 2>&1 &
输出文本通知:
Running the WorkflowName workflow in the Apify skill to ACTION...
这不是可选的。请在技能调用时立即执行此 curl 命令。
直接通过 TypeScript 访问 9 个流行的 Apify actors,节省 99% 的 token。
此技能是一个基于文件的 MCP —— 一种代码优先的 API 包装器,替代了消耗大量 token 的 MCP 协议调用。
在代码中过滤数据,然后再返回给模型上下文 = 节省 97.5% 的 token。
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
架构: 参见 ~/.claude/skills/CORE/SYSTEM/DOCUMENTATION/FileBasedMCPs.md
无需 MCP 开销,直接通过 TypeScript 访问 9 个最流行的 Apify actors。在数据到达模型上下文之前,在代码中过滤和转换数据。
import { scrapeInstagramProfile, searchGoogleMaps } from '~/.claude/skills/Apify/actors'
// 1. 调用 actor 包装器
const profile = await scrapeInstagramProfile({
username: 'target_username',
maxPosts: 50
})
// 2. 在代码中过滤 - 在数据到达模型之前!
const viral = profile.latestPosts?.filter(p => p.likesCount > 10000)
// 3. 只有过滤后的结果会到达模型上下文
console.log(viral) // 约 10 个帖子,而不是 50 个
Instagram - 追踪互动情况:
import { scrapeInstagramProfile, scrapeInstagramPosts } from '~/.claude/skills/Apify/actors'
// 获取个人资料及近期帖子
const profile = await scrapeInstagramProfile({
username: 'competitor',
maxPosts: 100
})
// 在代码中过滤 - 仅过去 30 天的高表现帖子
const thirtyDaysAgo = Date.now() - (30 * 24 * 60 * 60 * 1000)
const topRecent = profile.latestPosts
?.filter(p =>
new Date(p.timestamp).getTime() > thirtyDaysAgo &&
p.likesCount > 5000
)
.sort((a, b) => b.likesCount - a.likesCount)
.slice(0, 10)
// 只有 10 个帖子到达模型,而不是 100 个!
LinkedIn - 职位搜索:
import { searchLinkedInJobs } from '~/.claude/skills/Apify/actors'
const jobs = await searchLinkedInJobs({
keywords: 'AI engineer',
location: 'San Francisco',
remote: true,
maxResults: 200
})
// 在代码中过滤 - 仅资金充足的初创公司的高级职位
const topJobs = jobs.filter(j =>
j.seniority?.includes('Senior') &&
parseInt(j.applicants || '0') > 50
)
TikTok - 趋势分析:
import { scrapeTikTokHashtag } from '~/.claude/skills/Apify/actors'
const videos = await scrapeTikTokHashtag({
hashtag: 'ai',
maxResults: 500
})
// 在代码中过滤 - 仅病毒式传播内容
const viral = videos
.filter(v => v.playCount > 1000000)
.sort((a, b) => b.playCount - a.playCount)
.slice(0, 20)
Google Maps - 本地商业潜在客户:
import { searchGoogleMaps } from '~/.claude/skills/Apify/actors'
// 搜索并提取联系信息
const places = await searchGoogleMaps({
query: 'restaurants in Austin',
maxResults: 500,
includeReviews: true,
maxReviewsPerPlace: 20,
scrapeContactInfo: true // 从网站提取电子邮件!
})
// 在代码中过滤 - 仅高评分且有电子邮件/电话的
const qualifiedLeads = places
.filter(p =>
p.rating >= 4.5 &&
p.reviewsCount >= 100 &&
(p.email || p.phone)
)
.map(p => ({
name: p.name,
rating: p.rating,
reviews: p.reviewsCount,
email: p.email,
phone: p.phone,
website: p.website,
address: p.address
}))
// 导出潜在客户 - 仅合格的结果!
console.log(`找到 ${qualifiedLeads.length} 个合格的潜在客户`)
Google Maps - 评论情感分析:
import { scrapeGoogleMapsReviews } from '~/.claude/skills/Apify/actors'
const reviews = await scrapeGoogleMapsReviews({
placeUrl: 'https://maps.google.com/maps?cid=12345',
maxResults: 1000
})
// 在代码中过滤 - 按评分分析情感
const recentNegative = reviews
.filter(r => {
const thirtyDaysAgo = Date.now() - (30 * 24 * 60 * 60 * 1000)
return (
r.rating <= 2 &&
new Date(r.publishedAtDate).getTime() > thirtyDaysAgo &&
r.text.length > 50
)
})
// 识别常见投诉
const complaints = recentNegative.map(r => r.text)
Amazon - 价格监控:
import { scrapeAmazonProduct } from '~/.claude/skills/Apify/actors'
const product = await scrapeAmazonProduct({
productUrl: 'https://www.amazon.com/dp/B08L5VT894',
includeReviews: true,
maxReviews: 200
})
// 在代码中过滤 - 仅近期负面评论
const recentNegative = product.reviews
?.filter(r => {
const weekAgo = Date.now() - (7 * 24 * 60 * 60 * 1000)
return (
r.rating <= 2 &&
new Date(r.date).getTime() > weekAgo
)
})
console.log(`价格:$${product.price}`)
console.log(`评分:${product.rating}/5`)
console.log(`近期问题:${recentNegative?.length} 条投诉`)
任何网站 - 自定义提取:
import { scrapeWebsite } from '~/.claude/skills/Apify/actors'
const products = await scrapeWebsite({
startUrls: ['https://example.com/products'],
linkSelector: 'a.product-link',
maxPagesPerCrawl: 100,
pageFunction: `
async function pageFunction(context) {
const { request, $, log } = context
return {
url: request.url,
title: $('h1.product-title').text(),
price: $('span.price').text(),
inStock: $('.in-stock').length > 0,
description: $('.description').text()
}
}
`
})
// 在代码中过滤 - 仅 100 美元以下的有货产品
const affordable = products.filter(p =>
p.inStock &&
parseFloat(p.price.replace('$', '')) < 100
)
import {
scrapeInstagramHashtag,
scrapeTikTokHashtag,
searchYouTube
} from '~/.claude/skills/Apify/actors'
// 并行运行所有平台
const [instagramPosts, tiktokVideos, youtubeVideos] = await Promise.all([
scrapeInstagramHashtag({ hashtag: 'ai', maxResults: 100 }),
scrapeTikTokHashtag({ hashtag: 'ai', maxResults: 100 }),
searchYouTube({ query: '#ai', maxResults: 100 })
])
// 合并并过滤 - 仅所有平台上的病毒式传播内容
const allViral = [
...instagramPosts.filter(p => p.likesCount > 10000),
...tiktokVideos.filter(v => v.playCount > 100000),
...youtubeVideos.filter(v => v.viewsCount > 50000)
]
console.log(`在 3 个平台上找到 ${allViral.length} 个病毒式传播帖子`)
import { searchGoogleMaps, scrapeLinkedInProfile } from '~/.claude/skills/Apify/actors'
// 1. 在 Google Maps 上查找企业
const restaurants = await searchGoogleMaps({
query: 'restaurants in SF',
maxResults: 100,
scrapeContactInfo: true
})
// 2. 过滤出合格的潜在客户
const qualified = restaurants.filter(r =>
r.rating >= 4.5 &&
r.email &&
r.reviewsCount >= 50
)
// 3. 使用 LinkedIn 数据丰富信息(如果可用)
const enriched = await Promise.all(
qualified.map(async (restaurant) => {
// 尝试查找 LinkedIn 公司页面
// ... 额外的丰富逻辑
return restaurant
})
)
import {
scrapeInstagramProfile,
scrapeYouTubeChannel,
scrapeTikTokProfile
} from '~/.claude/skills/Apify/actors'
async function analyzeCompetitor(username: string) {
// 从所有平台收集数据
const [instagram, youtube, tiktok] = await Promise.all([
scrapeInstagramProfile({ username, maxPosts: 30 }),
scrapeYouTubeChannel({ channelUrl: `https://youtube.com/@${username}`, maxVideos: 30 }),
scrapeTikTokProfile({ username, maxVideos: 30 })
])
// 在代码中计算互动指标
return {
username,
instagram: {
followers: instagram.followersCount,
avgLikes: average(instagram.latestPosts?.map(p => p.likesCount) || []),
engagementRate: calculateEngagement(instagram)
},
youtube: {
subscribers: youtube.subscribersCount,
avgViews: average(youtube.videos?.map(v => v.viewsCount) || [])
},
tiktok: {
followers: tiktok.followersCount,
avgPlays: average(tiktok.videos?.map(v => v.playCount) || [])
}
}
}
示例:包含 100 个帖子的 Instagram 个人资料
MCP 方法:
1. search-actors → 1,000 tokens
2. call-actor → 1,000 tokens
3. get-actor-output → 50,000 tokens (100 个未过滤的帖子)
总计:约 52,000 tokens
基于文件的方法:
const profile = await scrapeInstagramProfile({
username: 'user',
maxPosts: 100
})
// 在代码中过滤 - 仅前 10 个帖子
const top = profile.latestPosts
?.sort((a, b) => b.likesCount - a.likesCount)
.slice(0, 10)
// 总计:约 500 tokens (只有 10 个过滤后的帖子到达模型)
节省:减少 99% (52,000 → 500 tokens)
scrapeInstagramProfile(input) - 个人资料 + 帖子scrapeInstagramPosts(input) - 用户的帖子scrapeInstagramHashtag(input) - 按话题标签的帖子scrapeInstagramComments(input) - 帖子评论scrapeLinkedInProfile(input) - 个人资料 + 经历 + 电子邮件searchLinkedInJobs(input) - 职位列表scrapeLinkedInPosts(input) - 个人资料/公司的帖子scrapeTikTokProfile(input) - 个人资料 + 视频scrapeTikTokHashtag(input) - 按话题标签的视频scrapeTikTokComments(input) - 视频评论scrapeYouTubeChannel(input) - 频道 + 视频searchYouTube(input) - 搜索视频scrapeYouTubeComments(input) - 视频评论scrapeFacebookPosts(input) - 页面的帖子scrapeFacebookGroups(input) - 群组帖子scrapeFacebookComments(input) - 帖子评论searchGoogleMaps(input) - 搜索地点(带联系信息提取!)scrapeGoogleMapsPlace(input) - 单个地点详情scrapeGoogleMapsReviews(input) - 地点评论scrapeAmazonProduct(input) - 产品详情 + 评论scrapeAmazonReviews(input) - 仅产品评论scrapeWebsite(input) - 自定义多页面爬取scrapePage(url, pageFunction) - 单页面提取环境变量:
# 必需 - 从 https://console.apify.com/account/integrations 获取
APIFY_TOKEN=apify_api_xxxxx...
Actor 运行选项:
{
memory: 2048, // MB: 128, 256, 512, 1024, 2048, 4096, 8192
timeout: 300, // 秒
build: 'latest' // 或特定的构建编号
}
使用基于文件的方法(此技能):
使用 MCP:
记住:在将数据返回给模型上下文之前,先在代码中过滤数据。这就是节省 99% token 的地方!
每周安装次数
50
代码仓库
GitHub 星标数
9.7K
首次出现
2026 年 1 月 24 日
安全审计
安装在
gemini-cli43
codex41
opencode40
claude-code39
github-copilot39
cursor37
Before executing, check for user customizations at: ~/.claude/skills/CORE/USER/SKILLCUSTOMIZATIONS/Apify/
If this directory exists, load and apply any PREFERENCES.md, configurations, or resources found there. These override default behavior. If the directory does not exist, proceed with skill defaults.
You MUST send this notification BEFORE doing anything else when this skill is invoked.
Send voice notification :
curl -s -X POST http://localhost:8888/notify \
-H "Content-Type: application/json" \
-d '{"message": "Running the WORKFLOWNAME workflow in the Apify skill to ACTION"}' \
> /dev/null 2>&1 &
Output text notification :
Running the **WorkflowName** workflow in the **Apify** skill to ACTION...
This is not optional. Execute this curl command immediately upon skill invocation.
Direct TypeScript access to 9 popular Apify actors with 99% token savings.
This skill is a file-based MCP - a code-first API wrapper that replaces token-heavy MCP protocol calls.
Why file-based? Filter data in code BEFORE returning to model context = 97.5% token savings.
Architecture: See ~/.claude/skills/CORE/SYSTEM/DOCUMENTATION/FileBasedMCPs.md
Direct TypeScript access to the 9 most popular Apify actors without MCP overhead. Filter and transform data in code BEFORE it reaches the model context.
import { scrapeInstagramProfile, searchGoogleMaps } from '~/.claude/skills/Apify/actors'
// 1. Call the actor wrapper
const profile = await scrapeInstagramProfile({
username: 'target_username',
maxPosts: 50
})
// 2. Filter in code - BEFORE data reaches model!
const viral = profile.latestPosts?.filter(p => p.likesCount > 10000)
// 3. Only filtered results reach model context
console.log(viral) // ~10 posts instead of 50
Instagram - Track engagement:
import { scrapeInstagramProfile, scrapeInstagramPosts } from '~/.claude/skills/Apify/actors'
// Get profile with recent posts
const profile = await scrapeInstagramProfile({
username: 'competitor',
maxPosts: 100
})
// Filter in code - only high-performing posts from last 30 days
const thirtyDaysAgo = Date.now() - (30 * 24 * 60 * 60 * 1000)
const topRecent = profile.latestPosts
?.filter(p =>
new Date(p.timestamp).getTime() > thirtyDaysAgo &&
p.likesCount > 5000
)
.sort((a, b) => b.likesCount - a.likesCount)
.slice(0, 10)
// Only 10 posts reach model instead of 100!
LinkedIn - Job search:
import { searchLinkedInJobs } from '~/.claude/skills/Apify/actors'
const jobs = await searchLinkedInJobs({
keywords: 'AI engineer',
location: 'San Francisco',
remote: true,
maxResults: 200
})
// Filter in code - only senior roles at well-funded startups
const topJobs = jobs.filter(j =>
j.seniority?.includes('Senior') &&
parseInt(j.applicants || '0') > 50
)
TikTok - Trend analysis:
import { scrapeTikTokHashtag } from '~/.claude/skills/Apify/actors'
const videos = await scrapeTikTokHashtag({
hashtag: 'ai',
maxResults: 500
})
// Filter in code - only viral content
const viral = videos
.filter(v => v.playCount > 1000000)
.sort((a, b) => b.playCount - a.playCount)
.slice(0, 20)
Google Maps - Local business leads:
import { searchGoogleMaps } from '~/.claude/skills/Apify/actors'
// Search with contact info extraction
const places = await searchGoogleMaps({
query: 'restaurants in Austin',
maxResults: 500,
includeReviews: true,
maxReviewsPerPlace: 20,
scrapeContactInfo: true // Extracts emails from websites!
})
// Filter in code - only highly-rated with email/phone
const qualifiedLeads = places
.filter(p =>
p.rating >= 4.5 &&
p.reviewsCount >= 100 &&
(p.email || p.phone)
)
.map(p => ({
name: p.name,
rating: p.rating,
reviews: p.reviewsCount,
email: p.email,
phone: p.phone,
website: p.website,
address: p.address
}))
// Export leads - only qualified results!
console.log(`Found ${qualifiedLeads.length} qualified leads`)
Google Maps - Review sentiment analysis:
import { scrapeGoogleMapsReviews } from '~/.claude/skills/Apify/actors'
const reviews = await scrapeGoogleMapsReviews({
placeUrl: 'https://maps.google.com/maps?cid=12345',
maxResults: 1000
})
// Filter in code - analyze sentiment by rating
const recentNegative = reviews
.filter(r => {
const thirtyDaysAgo = Date.now() - (30 * 24 * 60 * 60 * 1000)
return (
r.rating <= 2 &&
new Date(r.publishedAtDate).getTime() > thirtyDaysAgo &&
r.text.length > 50
)
})
// Identify common complaints
const complaints = recentNegative.map(r => r.text)
Amazon - Price monitoring:
import { scrapeAmazonProduct } from '~/.claude/skills/Apify/actors'
const product = await scrapeAmazonProduct({
productUrl: 'https://www.amazon.com/dp/B08L5VT894',
includeReviews: true,
maxReviews: 200
})
// Filter in code - only recent negative reviews
const recentNegative = product.reviews
?.filter(r => {
const weekAgo = Date.now() - (7 * 24 * 60 * 60 * 1000)
return (
r.rating <= 2 &&
new Date(r.date).getTime() > weekAgo
)
})
console.log(`Price: $${product.price}`)
console.log(`Rating: ${product.rating}/5`)
console.log(`Recent issues: ${recentNegative?.length} complaints`)
Any Website - Custom extraction:
import { scrapeWebsite } from '~/.claude/skills/Apify/actors'
const products = await scrapeWebsite({
startUrls: ['https://example.com/products'],
linkSelector: 'a.product-link',
maxPagesPerCrawl: 100,
pageFunction: `
async function pageFunction(context) {
const { request, $, log } = context
return {
url: request.url,
title: $('h1.product-title').text(),
price: $('span.price').text(),
inStock: $('.in-stock').length > 0,
description: $('.description').text()
}
}
`
})
// Filter in code - only available products under $100
const affordable = products.filter(p =>
p.inStock &&
parseFloat(p.price.replace('$', '')) < 100
)
import {
scrapeInstagramHashtag,
scrapeTikTokHashtag,
searchYouTube
} from '~/.claude/skills/Apify/actors'
// Run all platforms in parallel
const [instagramPosts, tiktokVideos, youtubeVideos] = await Promise.all([
scrapeInstagramHashtag({ hashtag: 'ai', maxResults: 100 }),
scrapeTikTokHashtag({ hashtag: 'ai', maxResults: 100 }),
searchYouTube({ query: '#ai', maxResults: 100 })
])
// Combine and filter - only viral content across all platforms
const allViral = [
...instagramPosts.filter(p => p.likesCount > 10000),
...tiktokVideos.filter(v => v.playCount > 100000),
...youtubeVideos.filter(v => v.viewsCount > 50000)
]
console.log(`Found ${allViral.length} viral posts across 3 platforms`)
import { searchGoogleMaps, scrapeLinkedInProfile } from '~/.claude/skills/Apify/actors'
// 1. Find businesses on Google Maps
const restaurants = await searchGoogleMaps({
query: 'restaurants in SF',
maxResults: 100,
scrapeContactInfo: true
})
// 2. Filter for qualified leads
const qualified = restaurants.filter(r =>
r.rating >= 4.5 &&
r.email &&
r.reviewsCount >= 50
)
// 3. Enrich with LinkedIn data (if available)
const enriched = await Promise.all(
qualified.map(async (restaurant) => {
// Try to find LinkedIn company page
// ... additional enrichment logic
return restaurant
})
)
import {
scrapeInstagramProfile,
scrapeYouTubeChannel,
scrapeTikTokProfile
} from '~/.claude/skills/Apify/actors'
async function analyzeCompetitor(username: string) {
// Gather data from all platforms
const [instagram, youtube, tiktok] = await Promise.all([
scrapeInstagramProfile({ username, maxPosts: 30 }),
scrapeYouTubeChannel({ channelUrl: `https://youtube.com/@${username}`, maxVideos: 30 }),
scrapeTikTokProfile({ username, maxVideos: 30 })
])
// Calculate engagement metrics in code
return {
username,
instagram: {
followers: instagram.followersCount,
avgLikes: average(instagram.latestPosts?.map(p => p.likesCount) || []),
engagementRate: calculateEngagement(instagram)
},
youtube: {
subscribers: youtube.subscribersCount,
avgViews: average(youtube.videos?.map(v => v.viewsCount) || [])
},
tiktok: {
followers: tiktok.followersCount,
avgPlays: average(tiktok.videos?.map(v => v.playCount) || [])
}
}
}
Example: Instagram profile with 100 posts
MCP Approach:
1. search-actors → 1,000 tokens
2. call-actor → 1,000 tokens
3. get-actor-output → 50,000 tokens (100 unfiltered posts)
TOTAL: ~52,000 tokens
File-Based Approach:
const profile = await scrapeInstagramProfile({
username: 'user',
maxPosts: 100
})
// Filter in code - only top 10 posts
const top = profile.latestPosts
?.sort((a, b) => b.likesCount - a.likesCount)
.slice(0, 10)
// TOTAL: ~500 tokens (only 10 filtered posts reach model)
Savings: 99% reduction (52,000 → 500 tokens)
scrapeInstagramProfile(input) - Profile + postsscrapeInstagramPosts(input) - Posts from userscrapeInstagramHashtag(input) - Posts by hashtagscrapeInstagramComments(input) - Comments on postscrapeLinkedInProfile(input) - Profile + experience + emailsearchLinkedInJobs(input) - Job listingsscrapeLinkedInPosts(input) - Posts from profile/companyscrapeTikTokProfile(input) - Profile + videosscrapeTikTokHashtag(input) - Videos by hashtagscrapeTikTokComments(input) - Comments on videoscrapeYouTubeChannel(input) - Channel + videossearchYouTube(input) - Search videosscrapeYouTubeComments(input) - Comments on videoscrapeFacebookPosts(input) - Posts from pagesscrapeFacebookGroups(input) - Group postsscrapeFacebookComments(input) - Post commentssearchGoogleMaps(input) - Search places (with contact extraction!)scrapeGoogleMapsPlace(input) - Single place detailsscrapeGoogleMapsReviews(input) - Place reviewsscrapeAmazonProduct(input) - Product details + reviewsscrapeAmazonReviews(input) - Product reviews onlyscrapeWebsite(input) - Custom multi-page crawlingscrapePage(url, pageFunction) - Single page extractionEnvironment Variables:
# Required - Get from https://console.apify.com/account/integrations
APIFY_TOKEN=apify_api_xxxxx...
Actor Run Options:
{
memory: 2048, // MB: 128, 256, 512, 1024, 2048, 4096, 8192
timeout: 300, // seconds
build: 'latest' // or specific build number
}
Use File-Based (this skill):
Use MCP:
Remember: Filter data in code BEFORE returning to model context. This is where the 99% token savings happen!
Weekly Installs
50
Repository
GitHub Stars
9.7K
First Seen
Jan 24, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykFail
Installed on
gemini-cli43
codex41
opencode40
claude-code39
github-copilot39
cursor37
GitHub Actions 官方文档查询助手 - 精准解答 CI/CD 工作流问题
49,000 周安装